The 6 Rules of Thumb for MongoDB Schema Design: Part Two

This post is the second part of he tour of modeling one-to-n relationships in MongoDD. The last topic covers the three basic schema designs: embedding, child-referencing, and parent referencing.

There are two factors to consider when picking this designs:

Will the entities on the “N” sie of the One-to-N ever stand alone?

What is the cardinality of the relationship

However, if you want to get a bit fancier, you can combine two techniques and include both styles of reference in your schema.

You can also add denormalization into your schema.

When deciding whether to denormalize or not consider these two factors first:

You cannot perform atomic update on a denormalized data.

Denormalization makes sense only if you have a high read to write ratio.

Read the rest of the post here: http://blog.mongodb.org/post/87892923503/6-rules-of-thumb-for-mongodb-schema-design-part-2

Leave a Reply

Your email address will not be published. Required fields are marked *