Use cases for NoSQL

robjmills picture robjmills · May 20, 2010 · Viewed 31.3k times · Source

NoSQL has been getting a lot of attention in our industry recently. I'm really interested in what peoples thoughts are on the best use-cases for its use over relational database storage. What should trigger a developer into thinking that particular datasets are more suited to a NoSQL solution. I'm particularly interested in MongoDB and CouchDB as they seem to be getting the most coverage with regard to PHP development and that is my focus.

Answer

spacemonkey picture spacemonkey · May 24, 2010

Just promise yourself that you will never try to map a relational data model to a NoSQL database like MongoDB or CouchDB... This is the most common mistake developers make when evaluating emerging tech.

That approach is analogous to taking a car and trying to use it to pull your cart down the road like a horse.

It's a natural reaction due to everyone's experience of course, but the real value in using a document database is being able to simplify your datamodel and minimize your suffering as a developer. Your codebase will shrink, your bugs will be fewer and easier to find, performance is going to be awesome, and scale will be much simpler.

As a Joomla founder I'm biased :-) but coming from the CMS space, something like MongoDB is a silver bullet as content maps very naturally to document systems.

Another great case for MongoDB is real-time analytics, as MongoDB has very strong performance and scale particularly regarding concurrency. There are case studies at the MongoDB.org website that demonstrate those attributes.

I agree with the notion that each database has its own aims and use cases; take the purpose of each database for evaluation accordingly.