Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> schema design: rows vs wide columns

Copy link to this message
Re: schema design: rows vs wide columns
If you store service Id by month, how do you deal with time range in query that spans partial month(s) ?

With regard to number of column families, 3 is the recommended maximum.


On Apr 7, 2013, at 1:03 AM, shawn du <[EMAIL PROTECTED]> wrote:

> Hello,
> I am newer for hbase, but i have some experience on cassandra. In the
> official document, it is said prefer to use rows instead of columns. I
> don't know whether I should follow.
> This is my user case:
> I have about hundreds of services. each service is stored by a
> number(service id). we try to store users registration for specific service
> in a day.
> so there are two solutions for this:
> rows:
> rowkey: month(2013-03) columns will be each service ids. values will be the
> number for each service.
> wide columns:
> rowkey: serviceId, columns/values will be months and numbers.
> Query requirement:
> we only query for a specific service id and time between a start time and
> end time.
> so which solution is better?
> also another question:
> it is said that we 'd better desgin less than 3 column families. it is
> true? can i create as many as tables i need in hbase?
> Thanks in advance.
> BR.Shawn