incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samal <samalgo...@gmail.com>
Subject Re: Data Modeling- another question
Date Fri, 24 Aug 2012 12:54:03 GMT
First is better choice, each filed can be updated separately(write only).
Second you have to take care json yourself (read first-modify-then write).

On Fri, Aug 24, 2012 at 5:45 PM, Roshni Rajagopal <
Roshni.Rajagopal@wal-mart.com> wrote:

> Hi,
>
> Suppose I have a column family to associate a user to a dynamic list of
> items. I want to store 5-10 key  information about the item, & no specific
> sorting requirements are there.
> I have two options
>
> A) use composite columns
> UserId1 : {
>  <itemid1>:<Name> = Betty Crocker,
>  <itemid1>:<Descr> = Cake
> <itemid1>:<Qty> = 5
>  <itemid2>:<Name> = Nutella,
>  <itemid2>:<Descr> = Choc spread
> <itemid2>:<Qty> = 15
> }
>
> B) use a json with the data
> UserId1 : {
>  <itemid1> = {name: Betty Crocker,descr: Cake, Qty: 5},
>  <itemid2> ={name: Nutella,descr: Choc spread, Qty: 15}
> }
>
> Which do you suggest would be better?
>
>
> Regards,
> Roshni
>
> This email and any files transmitted with it are confidential and intended
> solely for the individual or entity to whom they are addressed. If you have
> received this email in error destroy it immediately. *** Walmart
> Confidential ***
>

Mime
View raw message