HBASE cassandra 本质上其实都是KEY -VALUE(非关系型) 的行式存储数据库 而列式数据库可以是关系型的。


笔者曾经对 hbase cassandra, bigtable等说成是 列式存储也是疑惑过很久。


1. 列式存储数据库(Column-oriented database)一般也叫做列式数据库。 你可以看下具体的定义,而且列式存储大部分是关系型数据库,支持SQL。有名的例子有:Sybase IQ, C-Store, Vertica, VectorWise, MonetDB, ParAccel, and Infobright

http://en.wikipedia.org/wiki/Column-oriented_DBMS


2.  懒的写例子,贴一段国外人的例子。一看就知道是 行式数据库(row-oriented)。 如果想进一步了解,或者英语不好看看以下几链接,就知道 column family其实就是相当于表的概念,每个column就是一个记录。

HBase will do two things for you:
1. All keys that have the same row key are stored in the same region
2. All keys are sorted


(The column family is special in the each column family has it's one store file, but the logical sort order still holds).

Think of it this way.
Say you have two column families and two regions (A and B). You find the following ordering:
Storefile(s) for column family 1 in Region A:
(row1, column family1, column1, ts)->value
(row1, column family1, column2, ts)->value
(row2, column family1, column1, ts)->value
(row2, column family1, column2, ts)->value

Storefile(s) for column family 1 in Region B:
(row3, column family1, column1, ts)->value
(row3, column family1, column2, ts)->value

Storefile(s) for column family 2: in Region A:
(row1, column family2, column1, ts)->value
(row1, column family2, column2, ts)->value
(row2, column family2, column1, ts)->value
(row2, column family2, column2, ts)->value

Storefile(s) for column family 2 in Region B:
(row3, column family2, column1, ts)->value
(row3, column family2, column2, ts)->value

So region A has rows row1 and row2, region B has row3.
A region is shard of a table based on the row key and just

#1 above means that HBase will never place key value for "row1" in different regions.
#2 means you very efficiently locate specific keys, as they are always stored sorted.



http://www.ibm.com/developerworks/cn/opensource/os-cn-cassandra/

http://blog.csdn.net/imzkz/article/details/5647811

http://database.51cto.com/art/201005/202153.htm


3. 其他人的认同文章。

http://blog.csdn.net/historyasamirror/article/details/6214466


4. 国外拒绝承认 他们是 column-oriented 的大讨论

http://dbmsmusings.blogspot.com/2010/03/distinguishing-two-major-types-of_29.html

https://groups.google.com/forum/#!topic/nosql-databases/nTHhOMD5HOw


5. 国内很多人误认为是 column-oriented

http://www.docin.com/p-595677296.html



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章