Thoughts from the Wet Coast
The musings of an ASP.NET Developer from Canada's We(s)t Coast
In the fall of 2011 I started a series of blog posts on NoSQL databases. Since then I have developed a conference session on the topic which I presented at DevTeach 2012 in Vancouver in May. In developing the talk I spent a good deal of time trying to understand the concept of Map/Reduce, as it can be a challenging topic.
As described earlier in this series, NoSQL databases can be partitioned across many systems (or servers). This gives rise to an interesting problem - how to query across these multiple servers. This problem was solved by the concept of Map/Reduce algorithms. Map/Reduce is a multi step querying process, which takes a big task and breaks it down into multiple smaller tasks, and as with many of the NoSQL innovations it was first developed at Google.
In my previous post in this series on NoSQL Databases, I showed how RavenDB embedded could be added to an existing ASP.NET MVC 3 application using NuGet and how it can be configured to use a folder in the App_Data folder.
In this blog I will add the code needed for my TaskController class to use RavenDB to store its data.
In my continuing series on NoSQL Databases I have been mainly describing some of the concepts behind NoSQL (and in particular Document) Databases. In this post I will start to dive into some code.
As mentioned earlier I will be using RavenDB as this is a .NET friendly database.
As my frequent readers would have noticed already, I have been diving into NoSQL databases recently – in particular Document Databases. But why do we need NoSQL databases in the first place. Surely the relational databases we have been using work fine – in fact they work very well in most situations.
The problem with them is they don’t always scale very well – and when I mean scale, I mean scale really big – across multiple nodes in a cluster. I alluded to this in the first post in this series, but as an aside I have decided to explore why in further detail in this post.
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.
A week or so ago the topic of NoSQL databases came up at a discussion at work, so I decided it was time I learnt about this topic.
A few days ago Julie Lerman (@julielerman) tweeted that she had published an article in MSDN Magazine on Document Databases (one of the major types of NoSQL databases) and reading that article started me on my research.
Most .NET developers, whether we work on the Web with ASP.NET Web-Forms or MVC, on Windows Phone or in the browser with Silverlight, or on the desktop with WPF have worked with some form of Database.
We are for the most part familiar with SQL Server, MySQL or Oracle Relational Database Management Systems (RDBMSs) – and we are used to writing database schemas and database code using some variety of SQL.
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.