Databases Reference
In-Depth Information
},
“preferences” : {
“v/nv”: “V”
}
},
...
}
Finally, adding the version element to it, the third level can be expanded to include timestamped
versions. To show this, the example uses arbitrary integers to represent timestamp-driven versions
and concocts a tale that Jolly Goodfellow declared his democratic inclinations at time 1 and changed
his political affi liation to the Republicans at time 5. The map for this row then appears like so:
{
“row_key_1” : {
“name” : {
“first_name” : {
1 : “Jolly”
},
“last_name” : {
1 : “Goodfellow”
}
},
“location” : {
“zip”: {
1 : “94301”
}
},
“preferences” : {
“d/r” : {
1 : “D”,
5 : “R”
}
}
},
...
}
That limns a map-oriented picture of a column-oriented database. If the example isn't detailed enough
for you, consider reading Jim Wilson's write-up titled, “Understanding HBase and Bigtable,” accessible
online at http://jimbojw.com/wiki/index.php?title=Understanding_Hbase_and_BigTable .
Laying out the Webtable
No discussion of column databases is complete without the quintessential example of a so-called
Webtable that stores copies of crawled web pages. Such a table stores the contents of a web page
in addition to attributes that relate to the page. Such attributes can be an anchor that references
the page or the mime types that relate to the content. Google fi rst introduced this example in its
research paper on Bigtable. A Webtable uses a reversed web page URL as the row-key for a web
Search WWH ::




Custom Search