One trend gaining traction in web development circles is the NoSQL movement. NoSQL recently received quite a positive bump when Twitter, the well-known social media site, announced it was moving from MySQL to the Java-based NoSQL Cassandra database. Twitter isn’t the only well-known web presence to be using NoSQL. Other notable sites using various types of NoSQL implementations are Facebook, Digg, and Rackspace. A lot of SQL Server professionals I’ve run across don’t really know what NoSQL is. Some think it’s a product, but most think it’s a competitor and potential threat to SQL Server and relational databases in general. They think it’s just the kind of nonsense that well-meaning but misguided application developers would come up with. In fact, the reality of what NoSQL is all about is really quite different. In this column I’ll dig into NoSQL and explain how it compares to relational databases like SQL Server. Save this column for that elevator ride with management: When an executive says he or she has heard that NoSQL is the wave of the future, you’ll be able to toss off a few key points explaining why NoSQL isn’t really a viable replacement for SQL Server.
Not Only SQL
First some history: The term “NoSQL” was coined back in 1998, and it originally stood for Not Only SQL. So the name NoSQL is a bit of a misnomer. NoSQL began its life as an alternative form of structured data storage. NoSQL databases are defined by more than the lack of a SQL query interface. In fact, NoSQL databases aren’t relational at all. Today’s NoSQL databases are distributed data stores that are designed for very large-scale data access requirements. Probably the most popular NoSQL database is the Cassandra open source project. Cassandra began as Facebook’s proprietary database, but Facebook released it as open source in 2008. To learn more about NoSQL databases and the open source Cassandra implementation, take a look at the Cassandra website. Other NoSQL implementations include Google BigTable, Apache Hadoop, MapReduce, MemcacheDB, and Voldemort.
NoSQL, Not Relational
Handling huge amounts of data storage and data writes, such as Twitter’s 7TB per day, can be problematic for relational databases. NoSQL distributed data store implementations are able to scale horizontally by distributing data across multiple nodes. Greater degrees of scaling are achieved by adding more nodes. Check out an interesting slide show explaining some of the rationale behind Twitter’s move to NoSQL.
NoSQL, No ACID
It’s important to remember that even though NoSQL databases are designed for performance and scalability, they aren’t designed to support the atomicity, consistency, isolation, and durability (ACID) properties that are standard in relational databases such as SQL Server. This is the critical tradeoff for NoSQL databases. They eschew the overhead that it takes to guarantee data integrity in favor of the ability to scale and handle massive amounts of data. Data integrity is the foundation for almost all business-oriented relational database applications. In addition, relational databases are designed to support queries and reporting; these aren’t typically important requirements for NoSQL implementations. Relational database developers have come to take for granted the standardized SQL data access language that works with most enterprise relational database platforms. Although there are a few differences among the vendors of SQL implementations, there are far more SQL similarities. Not so in the NoSQL realm; each different NoSQL implementation uses a proprietary data access mechanism.
NoSQL, No Fear
SQL Server DBAs don’t need to fear that NoSQL represents some new technology wave that will sweep away relational databases like SQL Server. Instead NoSQL is just another tool in the application developer’s toolbox. Just like you can’t use a hammer to fix to every job around the house, you can’t expect that a relational database is always the right choice for every data access application. NoSQL implementations solve a data storage problem that relational databases weren’t really designed to address. So the bottom line on NoSQL is that NoSQL isn’t a technology that’s going to replace relational database systems like SQL Server—except in very specialized instances. SQL Server and other relational databases will remain at the core of the vast majority of enterprise database applications for the foreseeable future. What’s your take on NoSQL? Pro or con, I’d like to hear from. Drop me a line at [email protected] or [email protected].