NoSQL – 3. On raven's wings                 Print      Add Favorite     Add Watch     Contact Author

Creator: host   12/1/2011 2:01:55 AM    Author: Charles Nurse   Source: http://charlesnurse.com/post/Look-Mom-NoSQL!-3-On-Ravens-Wings.aspx   Views: 505    0    0  
Tags:
NoSql Database ORM Database type Raven

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.


Rating People: 71   Average Rating:     
Comment List:


  No Record 


Post your comment

Your Name: Required
Your Mail: Email is used only to display Gravatar
Your Site:
CAPTCHA image
Enter the code shown above in the box below
Comment Info:         

     DnnModule.com is build to provide quality modules and skins, Some of them are free,some not. We wish these stuffs( free or not ) can be useful to you.

    Besides that, We also provide a full range of professional services, ranging from web site build, seo, system management, administration, support, senior consultancy and security services.   We act as if your development project or network was ours, with care and respect. We are not satisfied until it works the way you want it to, and we don't silently ignore found issues as somebody else's problem.