Mongodb - Modelling a product catalog with user specific pricing -


looking @ mongodb product catalog example (for data caching lookups), how best implement pricing , qty available specific user logged in. picturing layout this:

[{"_id":"skua",   "details":{ "msrp": "$15", "short_desc": "my short description"} , "priceqty" : [{"custid": 1, "price":10 , "qty":25 },{"custid": 2, "price":9 , "qty":20 }] }] 

(but need push in updated (or add if first log in) pricing when user logs in (ex: remove custid = 1 documents , push in ). or make sense keep item information in 1 place , create separate collection holding sku, price, customer, , qty? not sure how use reference id on sql left join item collection pricing collection second approach.

the item collection hold 100k+ (for quoting purposes) pricing , qty hold 2k ordered on spot. unfortunately, have mind in relational world still.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -