Consider the index in a book. Each book will have its own index, which lists all the words in an alphabetical order showing their location within the book. However, if we want to keep track of word occurrences in multiple books, checking each book's index is quite inefficient. Let's look at an example.
The standard indexing model
An example – books with an index of words
Imagine we have three books: Book 1, Book 2, and Book 3, and the following are their respective indexes. The numbers beside each word represent which page the word occurs on:
* Book 1 (Index) - apple - 4, 10, 20 - cat - 10, 21, 22 - zebra - 15, 25, 63 * Book 2 (Index) - banana - 14, 19, 66 - cake - 10, 37, 45 - zebra - 67...