I recently had the opportunity to attend the ALT .NET meeting in New York City and catch the presentation on NoRM and MongoDB by John Zablocki. As someone who was educated and has worked with only relational databases throughout his career it was kind of a mind bending experience. The concept of literally storing data ad-hoc within the “database”, without any real relational model to speak of.
The reasons for this shift in thinking vary, but the main reason is the increased need to support horizontal scaling. Traditionally, we have known vertical scaling, whereby a bigger machine is brought in as needs increase. In today’s computer world where we are starting to see limits on processor speed, this is simply not feasible to large high volume sites such as Amazon, Facebook, Twitter, and Google. Horizontal scaling is based on the principle that you can get better performance by increasing the number of machines hosting the service, even if the individual machines themselves are standard consumer boxes. However, as we begin to leverage this distributed model, the limitations of RDBMS become apparent, hence the need for something different.
Database persons will often talk about ACID with respect to RDBMS as a means for ensuring data consistency. ACID often refers to the transactions within the database: Atomicity, Consistency, Isolation, Durability. But when we start moving into distributed systems this becomes much harder to utilize without compromising performance. In 2000, Eric Brewer introduced the CAP theorem. CAP stands for Consistency, Availability, and Partition Tolerance. It postulates that a database system can ONLY ever provide two of these principles. Most RDBMS system are CP (Consistency, Partition tolerance) systems. MongoDb (and other NoRM systems) is an example of AP systems, or highly available with “eventual” consistency. It means that the MongoDb system does not care about immediate consistency, but that the system will eventually be consistent. This is a rather hard concept to get your head around and I am not here to sell you on the idea; I leave that to members of the NoRM community.
Official link to MongoDB project: http://www.mongodb.org/