hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Update of "Hbase/FAQ" by AlexYam
Date Fri, 01 Jul 2011 14:10:48 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The "Hbase/FAQ" page has been changed by AlexYam:
http://wiki.apache.org/hadoop/Hbase/FAQ?action=diff&rev1=70&rev2=71

Comment:
Fixing a few typo's

  
  Rather than a friendships table, you could just have a friendships column family in the
users table. Each column in that family would contain the ID of a friend. The value could
store anything else you would have stored in the friendships table in the relational model.
As column families are stored together/sequentially on a per-row basis, reading a user with
1 friend versus a user with 10,000 friends is virtually the same. The biggest difference is
just in the shipping of this information across the network which is unavoidable. In this
system a user could have 10,000,000 friends. In a relational database the size of the friendship
table would grow massively and the indexes would be out of control.
  
- '''Q: Can you please provide an example of "good de-normalization" in HBase and how its
held consistent (in your friends example in a relational db, there would be a cascadingDelete)?
As i think of the users table: if i delete an user with the userid='123', then if have to
walk through all of the other users column-family "friends" to guaranty consistency?! Is de-normalization
in HBase only used to avoid joins? Our webapp doenst use joins at the moment anyway.'''
+ '''Q: Can you please provide an example of "good de-normalization" in HBase and how its
held consistent (in your friends example in a relational db, there would be a cascadingDelete)?
As I think of the users table: if I delete an user with the userid='123', do I have to walk
through all of the other users column-family "friends" to guaranty consistency?! Is de-normalization
in HBase only used to avoid joins? Our webapp doesn't use joins at the moment anyway.'''
  
  You lose any concept of foreign keys. You have a primary key, that's it. No
  secondary keys/indexes, no foreign keys.

Mime
View raw message