thanks sean, On Mon, Aug 30, 2010 at 2:18 PM, Sean Cribbs <s...@basho.com> wrote: > Norman, > > First, you will likely run into problems if you store every cart in the same > object as the store, for example, if multiple people try to update their > carts at the same time. I would store each cart individually, and link them > back to the store or keep them in a bucket named for the store, i.e. > carts_[store_key]/[cart_key].
the data in the cart does not change as this will only be stored when the user has made the payment, the only thing that will change in the cart will be the status of the transaction. whether it has been paid or not. with this in mind do you think it is still better to keep the carts in a different bucket to the store? > > As far as the algorithm for upselling, that sounds like the job of a graph > database, which would make it easy to do traversals between purchased items, > categories, etc between multiple stores. on the graph database in your wiki https://wiki.basho.com/display/RIAK/Riak+Compared+to+Neo4j would i need to push the data into this or does riak provide (will) have this built in? i am more interested in the storage of the initial data. > > Sean Cribbs <s...@basho.com> > Developer Advocate > Basho Technologies, Inc. > http://basho.com/ > > On Aug 30, 2010, at 6:03 AM, Norman Khine wrote: > >> hello, >> i am designing a schema to store shopping cart data and checkout >> confirmation for a multi shop environment, here is what i have now and >> am hoping for advise if there could be more efficient ways to do this. >> >> the point of the exercise is to be able to study the purchasing habits >> of shoppers and also cross sell based on the following question: >> >> "what other products does a cart have that may be of interest at the >> next checkout across the whole set of stores" >> >> i am thinking to store each shop and then within it store the carts >> for that specific shop. >> >> http://pastie.org/1126289 >> >> store = {"name": "Bébebox", >> "url_hash":"bébebox", >> "store-type": ["childres's clothes", "children's toys"....], >> "carts":[ >> {"cart-id": "X12345", >> "date":30/08/2010, >> "total":26.00, >> "tax": 12, >> "status":"pending", >> "products": [ >> { "name":"Nice baby dress", >> "url_hash":"cool-street-kid", >> "price": 4.00, >> "currency": "EURO", >> "size":23, >> "description":"This is the desc." >> }, >> .... >> } >> } >> >> would this be an efficient way to store the objects in riak for >> example if i want to retrieve all the products with a price range of >> up to 4.00 EURO and stores that have category "childres's clothes" and >> size is 23? >> >> >> any suggestions would be much appreciated. >> >> thanks >> >> norman >> >> >> -- >> ˙uʍop ǝpısdn p,uɹnʇ pןɹoʍ ǝɥʇ ǝǝs noʎ 'ʇuǝɯɐן sǝɯıʇ ǝɥʇ puɐ 'ʇuǝʇuoɔ >> ǝq s,ʇǝן ʇǝʎ >> %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or >> chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] ) >> >> _______________________________________________ >> riak-users mailing list >> riak-users@lists.basho.com >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > -- ˙uʍop ǝpısdn p,uɹnʇ pןɹoʍ ǝɥʇ ǝǝs noʎ 'ʇuǝɯɐן sǝɯıʇ ǝɥʇ puɐ 'ʇuǝʇuoɔ ǝq s,ʇǝן ʇǝʎ %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] ) _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com