One of the challenges that comes with moving to MongoDB is figuring how to best model your data. While most developers have internalized the rules... of thumb for designing schemas for RDBMSs, these rules don't always apply to MongoDB. The simple fact that documents can represent rich, schema-free data structures means that we have a lot of viable alternatives to the standard, normalized, relational model. Not only that, MongoDB has several unique features, such as atomic updates and indexed array keys, that greatly influence the kinds of schemas that make sense.
Schema design is a critical step in making sure an application scales well. There are considerations for reads and writes, both with and without... sharding. We'll go through a few use cases and examine how difference schemas impact performance.
3rd October 2011