HBase schema help

Posted by Jody Powlette on Stack Overflow See other posts from Stack Overflow or by Jody Powlette
Published on 2010-05-11T18:42:37Z Indexed on 2010/05/15 10:44 UTC
Read the original article Hit count: 424

Filed under:

Coming from a SQL Server background, I'm a newbie with regard to HBase, but the technology looks to be a good fit for what we're doing and the cost is definitely right!

I need to maintain a list of log entries which normally I would create in an RDBS as:

create table Log ( UserID int, SiteID int, Page varchar(50), Date smalldatetime )

where one user may have 0 or 1000 rows in this simple table. Typical queries would be to find all the rows for one user or all the rows for one user on one site.

How does this translate into a "map" in HBase where there is no "row key" AND the same (SiteID,Page) may appear many times. My first thought is that UserID is a row key, but I still don't understand "column families" and the other terminology well enough to understand how to setup the table to hold this data where the one UserID can have many (SiteID,Page,Date) "rows".

Any direction is appreciated!

© Stack Overflow or respective owner

Related posts about hbase