hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilm Schumacher <wilm.schumac...@cawoom.com>
Subject Re: HBase entity relationship
Date Mon, 24 Nov 2014 20:46:11 GMT

perhaps I'm wrong, but this sounds a little bit "sql-ish" to me,
relations by ids etc..

Is there a hierarchy in the data? Is A some sort of "container" for B?
Or are the connections arbitrary?

Could your make an example where this relation of classes A and B fit or
make a more verbose explanation of your problem?

I ask because there would be no harm in putting all data from B in an A
row. hbase is build for trillions of rows and millions of columns, so
you could fit all Bs related to an A into the specific A.

E.g. if you have resources A (e.g. cars), and a number of users B which
do stuff on A (e.g. renting), you could make up an A by two column
families ("data", "renting"), where data contains the resource specific
data (e.g. speed etc.), and "renting" would contain thousands of renting
informations, e.g. "renting:<timestamp>" => "<username>", so there would
be no need of using a second (or third) table for the renting informations.

An complete explanation of the problem could be very complicate (and
perhaps you do not want to share the specific problem), so perhaps you
find a similar problem which fits your problem space. This would make an
answer much easier ;).



Am 24.11.2014 um 18:31 schrieb jatinpreet:
> Hi,
> I am designing my HBase table schema. I have two entities that are related
> to each other in a nested structure. For example, consider two entities A
> and B. Both of them are complex types.
> Entity A contains one or more entity B values. Both entities have their own
> tables. Each row of entity A can have multiple columns with the reference to
> entity B table's row key. So, the qualifier goes like, b_{b-rowkey}. Each
> row of entity B has a column referencing to the parent entity A's row.
> At any time if I need to fetch all the B's contained in a single entity A,
> which is better, fetching all row IDs of entity B from the entity A's row
> and then going to the entity B table for those specific keys. Or scanning
> for all the rows with a filter on the column with entity A's key in entity
> B's table.
> I would appreciate any help in this matter.
> Thanks,
> Jatin
> --
> View this message in context: http://apache-hbase.679495.n3.nabble.com/HBase-entity-relationship-tp4066296.html
> Sent from the HBase User mailing list archive at Nabble.com.

View raw message