I was reviewing this slide show [slide 134] (Ian Varely/salesforce.com at HBase Con 2012) where he states that you can nest entities two levels deep.
Here is an example he gives of nesting an entity one level deep:
Entities: Band, Shows; where Band 1:M Shows.
Table: Band
CF:"CF"
Qualifiers:
"Name":<name>
"Genre":<genre>
"Show_<id>":venue_<id>_date_<date>_start_time_<start_time>_cover_price_<cover_price>
However, he doesn't give an example of how to nest two levels deep. My best guest from slide 134 would be something like the following...
Entities: Customer, Meeting, Attendees; where Customer 1:M Meetings and Meetings 1:M Attendees.
Table: Customer
CF: "CF"
Qualifiers:
"Company_name":<company_name>
"Capacity":<capacity>
"Meeting_<id>":host_<id>_start_time_<start_time>_attendee_<id>_attendee_join_time_<join_time>
However the attributes of the meeting
entity (host_id, start_time) are repeated in every column unnecessarily. Moving the meeting
attributes to its key maintains the problem:
"Meeting_<id>_host_<id>_start_time_<start_time>":attendee_<id>_attendee_join_time_<join_time>
Here is another option I thought of which seems to make more sense, the use of JSON:
"Meeting_<id>_host_<id>_start_time_<start_time>":[{attendee_id:<id>,join_time:<time>}, ..]
However, why not just use one column as a giant JSON string containin the meetings and columns?
Is this what is meant by nesting two levels deep in an HBase schema, or is there much better way to do it?