database design - Query-first approach for MongoDB? -
i'm beginning design brand new mongodb database project surely have lot of concurrent access. i'm choosing mongodb know how scalable , how fast queries be.
i know, however, using mongodb, sake of performance, should try hit database few times possible.
i know apache cassandra, nosql database, advocates "query-first" approach, means should think of queries first, , organize data structures according them.
now, i'm wondering if same principle applies mongodb.
i didn't find related discussion on web far.
for organizing , modeling data in mongo, word want learn , search on denormalization. think of queries first when working mongo. not modeling, indexing well.
a rule heard @ mongo conference how denormalize:
- if data static, go ahead , denormalize/embed data in document.
- if data changes quite often, make reference document.
i've seen true after year of production mongo work. embedding data changes has caused lot of pain.
Comments
Post a Comment