Since sometime there has been increasing focus on NoSQL databases and RavenDB is one of the front runners in the race for .NET development. Never heard of NoSQL or Raven DB? Not to worry, that’s what this post would focus.
NoSQL: NoSQL is a class of object-oriented databases that do not use SQL as a query language. Some technologist also call it as not only SQL. The NoSQL databases are fairly simple in structure and differ from relational databases in following ways:
- NoSQL databases do not have fixed schema. They do not support join operations like relational databases do
- NoSQL databases do not scale vertically (or scale up); they generally scale horizontally (scale out)
- Querying a NoSQL database (a really good one) can be much faster than querying a RDBMS database since you are dealing with objects and are getting rid of ORMs.
- NoSQL databases do not classify data into rows and columns (another way of saying are not RDBMS), but they typically classify or organize data into Key-Value stores, Document-stores, Graphs, and BigTable.
- NoSQL are less consistent than RDBMS databases but this limitation can be overcome by a correct architecture design.
So, having said that RavenDB is a NoSQL database makes it clear that you will not be dealing with any rows or columns, or any SQL queries, joins, etc. Keeping it simpler - Less DBA work, and more development!
RavenDB: RavenDB is a Document-store (do not misinterpret this as another document repository as SharePoint, FileNet, or Documentum) database that allows storing objects as schema-less JSON on a scalable infrastructure and uses LINQ as a query language. Like all RDBMS, it supports ACID transactions, and implements Unit of Work pattern.
What does a document-store database mean?
The concept of document-store database isn’t new and as per me, it existed in early 90s as well. The document-store database existed (when RDBMS did not exist) as flat files. Some of the most evident & popular problems with flat files were inconsistent or proprietary mechanism of writing/reading data, querying or searching data, unavailability of quick backup, scaling and many more. To resolve these issues, RDBMS databases such as dBase III (my first RDBMS data store), FoxPro and Access evolved.
Now improving on this, a document-store database can be said as:
- Pre-defined schema of documents (or objects) while creation of database
- A standard way (using encodings such as Xml, JSON, YAML, BSON) of writing/reading objects (that contain business data)
- along with data some metadata such as tags, hierarchy, etc can be saved.
- and each record can be accessed via a unique key (maps to a primary key in RDBMS).
- not done just by a key,
- but by language specific query language like LINQ, or REST over HTTP to retrieve record using metadata.
Having explained that, the above definition of RavenDB stands appropriate.