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

Switch to Plain View
HBase, mail # user - schema design: rows vs wide columns


+
shawn du 2013-04-07, 08:03
Copy link to this message
-
Re: schema design: rows vs wide columns
Ted 2013-04-07, 18:58
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.

Cheers

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
+
Stack 2013-04-07, 22:04
+
Ted Yu 2013-04-07, 22:27
+
Andrew Purtell 2013-04-07, 22:52
+
Viral Bajaria 2013-04-07, 23:51
+
ramkrishna vasudevan 2013-04-08, 03:59
+
lars hofhansl 2013-04-08, 04:39
+
ramkrishna vasudevan 2013-04-08, 04:51
+
Doug Meil 2013-04-08, 14:21
+
Ted Yu 2013-04-16, 14:02
+
Jean-Marc Spaggiari 2013-04-16, 14:04
+
Ted Yu 2013-04-16, 14:08
+
Michael Segel 2013-04-16, 14:35
+
Adrien Mogenet 2013-04-28, 15:23
+
Stack 2013-04-07, 22:45
+
Michael Segel 2013-04-08, 11:17