Database Reference
In-Depth Information
Figure 2-1. Two approaches to indexing
A key-value store can be thought of like a catalog. All the items in a catalog (the values) are
organized around some sort of index (the keys). Just like a catalog, a key-value store is very
quick and effective if you know the key you're looking for, but isn't a whole lot of help if
you don't.
For example, let's say I'm looking for Marshall's review of The Godfather . I can quickly
refer to my index, find all the reviews for that film, and scroll down to Marshall's review: “I
prefer the topic…”
A document warehouse, on the other hand, is a much more flexible type of database. Rather
than forcing you to organize your data around a specific key, it allows you to index and
search for your data based on any number of parameters. Let's expand on the last example
and say I'm in the mood to watch a movie based on a topic. One naive way to find such a
movie would be to search for reviews that contain the word “book.”
In this case, a key-value store wouldn't be a whole lot of help, as my key is not very clearly
defined. What I need is a document warehouse that will let me quickly search all the text of
all the reviews and find those that contain the word “book.”
 
Search WWH ::




Custom Search