.NET Devs Warming Up To MongoDB and Cassandra NoSQL Databases
There are scores of so-called NoSQL databases that allow organizations to create scalable ways of parsing and querying non-relational data. Two that are attracting a growing number of .NET developers are the open source MongoDB and Cassandra databases.
In back to back sessions Tuesday at the Visual Studio Live! conference in Chicago, Ted Neward, principal with Neward & Associates, outlined the nuances of both NoSQL databases. In each session, Neward expressed his disdain for the NoSQL nomenclature, which effectively stands for a database that is "not-SQL." By that measure, Neward said, "NoSQL also applies equally to cars, rainbows and unicorns. None of them are a SQL database either."
For that matter, Neward continued, the list of things that are not SQL databases include object databases, writing to a file, key value stores, hierarchical document databases, XML files and graph databases. "It's a horrible term to use collectively," he said. "They all are piles of data managed by a program."
The term, he argues, also gives the impression that the various non-SQL databases are similar, which often they're not. "It doesn't mean Mongo and Cassandra have much in relationship to one another other than the fact that they both store data," he said.
Neward's distaste for the term notwithstanding, MongoDB is regarded as one of the leading NoSQL databases. The term MongoDB is derived from the word humungous and reflects the database's ability to scale to handle very large datasets, typically documents. The only commercial supplier of MongoDB is 10Gen.
Many customers looking for a high performance documents database have recently gravitated to MongoDB because it is fast, schema-free, open-source and language independent. Written in C++, it runs on all operating systems including Unix, Linux and Windows.
Neward doesn't expect MongoDB or any other non-SQL database to replace traditional relational database management systems, notably Microsoft's SQL Server. "Let SQL Server store traditional data," he said. "When you want to store other binaries, store that into MongoDB."
In the following session Neward dove into Cassandra, which was originally developed by Facebook to power its inbox search capability. Neward said Cassandra provides a column-based structured key-value star store. However, the open source community implemented a layer that gives the database more of the look and feel of a relational database starting with Cassandra 1.0. CQL 3.0 has been available since Cassandra 1.1. "So you can argue in some respects that Cassandra isn't NoSQL but CQL for Cassandra Query Language, which has relational-like mechanisms under the underlying Cassandra system," he said.
Cassandra is written in Java, meaning .NET developers who want to look at the source code will have to brush up on their Java skills, Neward said. "If you have no Java skills, if you know how to program in C#, and specifically if you know how to program in C# 1.0, you know how to read Java," he said. "As a matter of fact, Java is actually C# 0.3. There's a lot of things that the C# language has that the Java language does not."
The Cassandra database, Neward said, is designed for multi-node clusters. "Cassandra actually wants to run on multiple machines," he said. "It is possible to set up multiple Cassandra nodes on one developer box. It's tricky. You're going to have to get into some very subtle configuration in order to make it happen. You are going to have to dive into the configuration files that Cassandra uses."
Posted by Jeffrey Schwartz on 05/15/2013 at 1:16 PM