No SQL, No Problems (or: Mo’ SQL, Mo’ Problems)
Let’s talk about NoSQL: If you’ve been following the latest trends in the .net world via reddit, twitter, or your favorite blogs, you’ve been seeing a great deal of chatter about a term called NoSQL. Some might even call it a ‘movement’ but that scares me just a little bit - when things become ‘movements’, their meanings become a bit nebulous. Here are a few cases where a ‘NoSQL’ solution might be useful to you:
- You have a several multi-million row tables that each have foreign key relationships to one another, joins against these tables pound the server, but must return rapidly.
- You have “jagged” datasets where each record has a different composition of fields and children, those children in turn have their own properties.
- You need to find a root record based on a complex set of relations to other tables.
- Dynamic creation and allocation of databases and document collections (including the capability of having nested collections)
- Ability to do deep-graph searches (i.e. locate documents based on child properties of the document)
- Very few requirements on what can be inserted into a database
- Support for regex searching.
Let me break it to you: NoSQL doesn’t mean NoStructure.To that end, I’ve been (with lots of help) incubating a project on GitHub called NoRM. In brief, NoRM is a library to connect to MongoDB using .Net (and Mono) and to query and hydrate documents into strongly & statically-typed documents in a way that doesn’t make us C# developers queasy. We still have a long way to go before a 1.0 release, but I think it’s important to point out some of the guys that have been most enthusiastic about this project (and contributed some great code and ideas) include: James Avery Jason Alexander Rob Conery Nate Kohari Karl Seguin These guys really know their stuff, and I am so happy to have them working on this with me. My next post will be about some of the design decisions we’ve made with NoRM and how you might use it (soon) in some of your own projects.