In my continuing research into NoSQL databases I needed to find a database to work with.  As a .NET developer I was immediately drawn to RavenDB – a Document Database written in .NET  by Ayende Rahien of NHibernate and Rhino Mocks fame.

Not only is RavenDB written in .NET but it supports LINQ – who can complain at that !!  RavenDB is open source (with a commercial license option).  It can be used in 3 modes:

  1. As a Windows Service
  2. As an IIS Application
  3. Embedded in a .NET Application

As .NET developers,  one of RavenDB’s strengths is that its Indexes can be written using LINQ queries:

from post in docs.Posts
select category in post.Categories
select new { category }

Unlike RDMS Systems, RavenDB’sIndexes do not slow CRUD performance.  This is because the Indexes are processed in the background and the results persisted in a Lucene Index. 

For those of you who need to compare this to how relational database systems work, a RavenDB Index is like a View – with the addition that the data is saved to disk – not dynamically generated on demand.  This is one of the reasons why Document Databases are fast.  You can find more information on how RavenDB indexes work in the RavenDB documentation.

Like most Document Databases RavenDB supports a RESTFull Interface.  For example, assuming that there is a RavenDB installed on port 8080 as an IIS application, using something like Fiddler, we can send an HTTP GET statement"

GET http://localhost:8080/docs/bobs_address

and assuming there is a document in the database with an id of bobs_address RavenDB will return a JSON document  and an HTTP  200 OK response:

HTTP/1.1 200 OK

{
  "FirstName": "Bob",
  "LastName": "Smith",
  "Address": "5 Elm St."
}

If the url does not correspond to a valid document then RavenDB will respond with the typical 404 message

HTTP/1.1 404 Not Found

As a .NET application RavenDB also has a rich Client API, which I will dive into much more detail in future posts as I build a RavenDB application.


Posted in: Data  Tags: , ,

Comments


November 26. 2011 15:05
security toronto
Hey , many thanks you for discussing your ideas on this website. I wound up inside your blog right after researching physical fitness connected issues on Yahoo… guess I lost track of what I had been performing! Anyway I’ll be back once again within the long run to check out your blog posts down the road.


United States hcg
December 10. 2011 09:48
hcg
The post is very nicely written and it contains many useful facts. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement. Thanks for sharing with us.

 Search Blog

 Calendar

«  February 2012  »
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011
View posts in large calendar

 Tags

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 Thoughts from the Wet Coast