incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirkjan Ochtman <dirk...@ochtman.nl>
Subject Re: CouchDB Carts and Orders Best Practice
Date Mon, 27 Dec 2010 11:29:43 GMT
On Mon, Dec 27, 2010 at 12:04, Shenouda Bertel <shenoudab@gmail.com> wrote:
>   What is the best practice for the carts implementation with CouchDB,
> which save the performance of the application, with less requests to CouchDB
> and without several saving of the CouchDB Document.

I would have a separate document per cart item (i.e. the item has two
"foreign keys", pointers to both the user and the product), so you can
update each item separately and can use a view to easily retrieve all
of the items in the cart, and lets you update the document for each
item separately.

Cheers,

Dirkjan

Mime
View raw message