The surge of interest in NoSQL databases -- and the slew of big-name production NoSQL implementations -- has led some people to wonder whether relational databases are on their way out. Definitely not – that’s the short answer. Relational databases are here to stay, and will continue to do what they do best: manage generic data, with relative simplicity, speed, high-performance, flexibility and scalability for users.
Of course, relational databases such as Oracle, SQL Server, and MySQL, achieve their simplicity and other benefits by being very complex internally.
The Achilles heel of these databases is their inability to scale quickly in fast-growing environments with massive workloads such as web services.
Generally, relational databases scale well but only when the scaling is done on a single-server node. When the capacity of a node is reached, the scaling need to be distributed across multiple server nodes -a situation that pits the complexity of relational databases with their scalability.
In a scenario where hundreds of hundreds or thousands of nodes need to scale quickly, the complexities can be overwhelming, and the characteristics that make RDBMS so appealing drastically reduce their viability as platforms for large distributed systems.
For an increasing number of companies, the solution to scalability involves NoSQL databases -- non-relational, distributed databases that typically scale horizontally, and provide superior data replication to SQL databases.
NoSQL has been attracting a lot of attention in recent years, primarily due to big-name production implementations. Two of the best known are Amazon's Dynamo and Google's BigTable.
NoSQL is very much a user-led phenomenon highlighted by the likes of Google, Amazon, Facebook, LinkedIn and Twitter, which created their own distributed data management technologies, says Mathew Aslett, an analyst at the 451 Group.
Aslett says Google and the other companies above chose NoSQL to deliver the performance and scalability benefits that traditional database products cannot match.
The database space is becoming more specialized with the emergence of alternative, non-relational databases, says Nosh Petigara, director of product strategy at10gen, creator of MongoDB, an open-source NoSQL database.
"Many of these database tools were created with the intention of scaling web applications," says Petigara. "In order to achieve this horizontal scalability, most non-relational databases don't support 'join'-like operations and relax ACID requirements. This has led to new data modeling patterns emerging (such as MongoDB's document-oriented model) to allow for data structures and operations to be modeled without joins and complex transactions."
While the shift to these models has been primarily driven by a need for scalability, NoSQL databases are proving to be a good match for a variety of data in web and enterprise applications, Petigara notes.
"Consequently, developers are now turning to databases such as MongoDB, not only for scalability, but also for ease-of-development," says Petigara.
There will always be a place for relational databases, but non-relational solutions are proving to be fast, flexible, and scalable for many tasks, he adds.
Petigara says many customers begin using MongoDB for logging or real-time analytics (typically semi-structured or unstructured data completely unsuited to a relational model), but over time start to migrate much of their content to MongoDB.
In the web world, textual or binary content, product catalogs, user profiles or actions, are all good fits for products such as MongoDB.
To ease the pain of developers switching from the relational to the non-relational database world, Petigara says 10gen has tried to maintain much of the rich functionality of a relational database, (such as dynamic queries and secondary indexes) -- "so that it feels very natural for those coming from a relational background."