Friday, October 14, 2016

NoSQL - RavenDB

NoSQL is a form of database, which is completely different from relational databases when talking in the terms of storing and retrieving data.

There are many types of NoSQL databases being used in the market for varied requirements. I am speaking about RavenDB(open source) which is a document database.

Calling it a document database, literally means that it stores data in the form of documents. Each document can be compared to a row of data in relational DBMS(related rows of data from multiple related tables).

RavenDB is being used with .NET as of now. In general scenario, .NET developers will select data from table in the database, manipulate the data as per functionality (if required) and then inserts the data back into the table. This is the area where NoSQL is made use of.

.NET developers need not reformat the data into table format anymore. They can store the JSON format files directly in the NoSQL (RavenDB) database.

Each document will have metadata information like ETag, LastModified, Version etc. Each document will have unique ID like the primary key value in RDBMS for each row.

A group of related documents is called a Collection.

Indexing: We also have the feature of indexing. RavenDB implicitly creates indexes on the search criteria being used as and when necessary. We can also create explicit indexes.

Replication: RavenDB supports replication. We can setup replication for required documents to move the data to SQL database for reporting purposes. We need to specify Destination table and a Document key from the Source Document collection and write code to map the document fields data to SQL table columns.

Its good to see and learn a different form of database working alongside traditional RDBMSs.

Happy NoSQLing!