2012/7/2, Amandeep Khurana <[email protected]>:
>> Here are the 2 options now. Both with a new table.
>>
>> 1) I store the key "personID" and a:a1 to a:an for the addresses.
>> 2) I store the key "personID" + "address
>>
>> In both I will have the same amount of data. In #1 total size will be
>> smaller since the key will be stored only once.
>>
>>
>
> The size will be the same. The underlying HFile will store 1 row per cell
> and the number of cells in both cases is the same.
>
> However, the first approach with multiple columns for addresses needs you to
> keep track of the number and makes updates, deletes, additions complicated
> as I highlighted earlier. The second option with putting both things in the
> key makes life much easier.
>
> If the data is primarily being accessed independently, I'd go with option 2.

Oh! I see! My misunderstanding comes from from my lack of HBase
knowledge/reflex. I forgot it was storing the data that way. So I
think I will most probably give a try to this 2nd option! Thanks for
sharing your ideas all over the day.

JM

Reply via email to