Databases Reference
In-Depth Information
Aren't all these commands useful for some quick queries? As mentioned earlier, Redis has a rich
set of commands for string values, lists, hashes, and sorted sets as well. However, I will skip those
details for now and move on to another NoSQL store. Details of each of these Redis commands are
covered in context later in this topic.
Storing Data In and Accessing Data from HBase
HBase could very well be considered the NoSQL fl ag bearer. It's an open-source implementation
of the Google Bigtable, which you can read more about at http://labs.google.com/papers/
bigtable.html . While key/value stores and non-relational alternatives like object databases have
existed for a while, HBase and its associated Hadoop tools were the fi rst piece of software to bring
the relevance of large-scale Google-type NoSQL success catalysts in the hands of the masses.
HBase is not the only Google Bigtable clone. Hypertable is another one. HBase is also not the ideal
tabular data store for all situations. There are eventually consistent data stores like Apache Cassandra
and more that have additional features beyond those HBase provides. Before exploring where HBase
is relevant and where it's not, let's fi rst get familiar with the essentials of data store and querying in
HBase. The relevance of HBase and other tabular databases is discussed later in this topic.
As with the earlier two NoSQL data stores, I explain the HBase fundamentals with the help of an
example and leave the more detailed architectural discussion for Chapter 4. The focus here is on
data storage and access. For this section, I cook up a hypothetical example of a feed of blog posts,
where you can extract and save the following pieces of information:
Blog post title
Blog post author
Blog post content or body
Blog post header multimedia (for example, an image)
Blog post body multimedia (for example, an image, a video, or an audio fi le)
To store this data, I intend to create a collection named blogposts and save pieces of information
into two categories, post and multimedia . So, a possible entry, in JSON-like format, could be as
follows:
{
“post” : {
“title”: “an interesting blog post”,
“author”: “a blogger”,
“body”: “interesting content”,
},
“multimedia”: {
“header”: header.png,
“body”: body.mpeg,
},
}
Available for
download on
Wrox.com
blogposts.txt
Search WWH ::




Custom Search