Skip to main content

NoSQL Data Modelling

Recently in one of the project we planned to use some NoSQL  Document database. One of the reasons we though document database would be a great fit was that we could get started without setting up any DB schema and start shoving entities into the document database.
Nothing can be further from the truth. Data modeling is as essential and as fundamental an exercise for NoSQL stores as it is for RDBMS. It is just that the concepts are different as compared to RDBMS where normalization\de-normalization provide some guidance. In my pursuit to understand how to model data for a document database i came across some great reference material that i want to share here.

I believe this is enough content for one to have a decent understanding on the topic and get going with the real modeling.


bryan said…
I would clarify to this extent: DATA modeling is about the data. DATABASE modeling is about storing the data for accuracy, flexibility, velocity, reliability and all those other system attributes (the "-ities") that comes with implementation choices.

DATA modeling strives to make the data understandable. DATABASE modeling strives to make the data accessible. Two very different objectives, and two very different tasks.

I agree that any implementation of a database will require some degree of thought and design -- unless, of course, you don't care about those "-ities".

I once placed a wastebasket full of discarded printouts and scrap paper onto a table, pointed to it, and said "This is a database. Not a very good one, because finding the data in it is inefficient and unreliable and sometimes the data you find is wrong, or the data you're looking for is missing. But this wastebasket full of paper is a database. Our goal, as database modelers and designers is to improve on this."

So it is with every innovation that comes along. Does it improve on the last version of our wastebasket? And was that just by accident, or did you think about it first? Thinking about it is "modeling".

Popular posts from this blog

Caching Images downloaded from web on Windows Phone Isolated storage

I was helping on a Windows Phone application where the requirement was to cache the images the phone downloads on the isolated storage for offline viewing. I wanted a solution which was simple and as transparent as possible. While researching I found  someone wrote a Silverlight converter for loading images from isolated storage. Taking that as a base I created a converted which can Load image from web (http + https), and persist it to isolated storage. In case of network connectivity issues can load the same image from isolated storage. It does that by mapping the http url to a isolated storage location. In case the network is down and the image is neither there in cache, loads a default image, passed as parameter to converter. Here is the gist for the implementation. To use the converter Import the name space. Declare the converter as resource. Set the Image Source Property to use this converter like this 

Angularjs and inplace edit

AngularJS is an awesome framework and Angular Directives make this framework super awesome :) AngularJS  directives help us extend the existing HTML DSL. You can create new tags, extend functionality using existing tag and create reusable component. I recently created a Inplace editable control in AngularJS. It basically allows to do in place editing for elements like H1, H2, H3 div etc, basically all read only control. I took the initial idea from this fiddle and added Text selection on edit. Cursor positioning Handle the Enter key press. Here is my fiddle

Integrating ASP.Net MVC with AngularJS

We recently released a Project Template for ASP.Net MVC and AngularJS here and here . I did a follow up post detailing how the project template has been setup and how to make AngularJS and MVC play well together on my company blog . If you are interested in understanding how the template works head over to my blog post and read it!