hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From N Kapshoo <nkaps...@gmail.com>
Subject HBase schema - 1 table or 2 tables?
Date Thu, 15 Apr 2010 18:07:39 GMT
Suppose I want a decent sized video to be sent to millions of users. I want
to store the video once and pointer to it in every user.  Is it OK in this
case to use 2 different tables or should I somehow try to squeeze the video
into 1 table under the 'senderuser'?

Table: Users
RowID: UserId
ColumnFamily: Videos
Column: VideoId

Table:Videos
RowID: VideoId
ColumnFamily: Content


Option2:
Table: Users
RowID: UserId
ColumnFamily: Videos
Column: VideoId
ColumnFamily: VideoContent    (This would be stored only for the 'sender'
userid)
Column: VideoId


My queries are per user. Then once a user lists the videos, he/she can click
on the link and retrieve the actual contents of the video.

Option1 seems natural to me coming from a RDBMS world, but for performance I
guess 2 would be better?

Any tips are appreciated.

Thanks in advance.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message