Recently in one of the project we planned to use some NoSQL Document database. One of the reasons we though document database would be a great fit was that we could get started without setting up any DB schema and start shoving entities into the document database.
Nothing can be further from the truth. Data modeling is as essential and as fundamental an exercise for NoSQL stores as it is for RDBMS. It is just that the concepts are different as compared to RDBMS where normalization\de-normalization provide some guidance. In my pursuit to understand how to model data for a document database i came across some great reference material that i want to share here.
- MongoDB Schema Design : Great resource from MongoDB. Start with this one first.
- MongoDB Data Modeling: A quick read but explains some important concepts related to modelling. Embedding vs Linking.
- MongoDB Data Modeling and Rails: Covers an example to make things more clear.
- NoSQL Data Modelling Techniques: A great post that explains about data modelling techniques for all NoSQL type stores.
I believe this is enough content for one to have a decent understanding on the topic and get going with the real modeling.
Comments
DATA modeling strives to make the data understandable. DATABASE modeling strives to make the data accessible. Two very different objectives, and two very different tasks.
I agree that any implementation of a database will require some degree of thought and design -- unless, of course, you don't care about those "-ities".
I once placed a wastebasket full of discarded printouts and scrap paper onto a table, pointed to it, and said "This is a database. Not a very good one, because finding the data in it is inefficient and unreliable and sometimes the data you find is wrong, or the data you're looking for is missing. But this wastebasket full of paper is a database. Our goal, as database modelers and designers is to improve on this."
So it is with every innovation that comes along. Does it improve on the last version of our wastebasket? And was that just by accident, or did you think about it first? Thinking about it is "modeling".