RavenDB is a very powerful and capable database that let you store documents. Over the next few weeks I will present you what I like so much about RavenDB, how you can use it and how NoSQL can change the way you think about the persistence layer.
This post is part of the RavenDB series. You can find the other parts here:
- Part 1: Introducing RavenDB: NoSQL for .Net
- Part 2: Getting RavenDB Up & Running
- Part 3: CRUD-Operations in RavenDB (.Net Client API)
- Part 4: CRUD-Operations in RavenDB (HTTP API)
- Part 5: Designing Documents for RavenDB
- Part 6: Map/Reduce: A Simple Explanation
- Part 7: Indexes in RavenDB
- Part 8: Set Based Operations in RavenDB
- Part 9: Relations in RavenDB
- Part 10: Paging in RavenDB
- Part 11: Evolving Documents in RavenDB
- Part 12: RavenDB 3: The New Management Studio
What is NoSQL?
As so many terms “NoSQL” has a lot of meanings. For some it stands for “No SQL” and is used whenever they want to describe a persistence System that is not a relational database. Others like myself look at saving data from the polyglot persistence angle and prefer the meaning “Not only SQL”.
What everyone agrees on is that the problems we have to solve today are not always a good fit for relational databases like Oracle or MS SQL Server. Those problems not only rise at companies like Twitter or Google. Even when you play around with a new web technology framework you feel the friction when you have to build a schema to store your data.
There are many different types of NoSQL databases. There are key–value stores like Riak, object databases like Db4o, graph databases like Neo4j and many more.
RavenDB is a Document Database who as the name implies stores all the data as documents. But be aware that those documents are not like Word documents, they are JSON objects who look like this one:
{ "Contact": { "Name": "Shelley Burke", "Title": "Order Administrator" }, "Name": "New Orleans Cajun Delights", "Address": { "Line1": "P.O. Box 78934", "Line2": null, "City": "New Orleans", "Region": "LA", "PostalCode": "70117", "Country": "USA" }, "Phone": "(100) 555-4822", "Fax": null, "HomePage": "#CAJUN.HTM#" }
Why RavenDB?
In the last 5 years I used mostly C# and the .Net Framework to develop applications. With that .Net centric background RavenDB is a natural fit. To query the database you can use LINQ (and not JavaScript). The .Net Client works great, the database itself runs on Windows and when you want to use AngularJS you have a HTTP API as well.
RavenDB calls itself a 2nd generation document database. There are many helpful optimisations and features (like transactions) that ease the transition to NoSQL. Oren Eini, the creator of RavenDB, is a well-known expert in the .Net world. His NHProfiler (for NHibernate) and EFProfiler (for Entity Framework) where a great help to me whenever I had to fix performance problems with those OR-Mappers. To prevent the same performance problems in RavenDB Oren put a lot of work in the detection and prevention of the most common errors. This is so fine-tuned that it will work with the few entries you normally have on a development machine.
Even if you don’t want to use the .Net parts you should check out RavenDB. It is open-source and licensed under the GNU Affero General Public License. Don’t panic, if you have proprietary software you can (or better must) buy the commercial licence.
Next
In the next post we will install RavenDB on our development machine and then play around with the sample database.
The post Introducing RavenDB: NoSQL for .Net appeared first on Improve & Repeat.