The road so far….

January 4, 2013

NoSQL = RDBMS + others

Filed under: java — Tags: , , — Rahul Sharma @ 10:25 am

In the recent past, I seen a few applications which have taken the NoSQL route. These apps dumped RDBMS as it did not sound good for the job. They took one of the NoSql stores.  Then evolved a complete schema there. The schema had concepts of foreign keys / constraints and thus realized the sore points of NoSQL. At some point in time these applications started to play with RDBMS in a new fashion which I call “Not only SQL.

You always start with app which has a fixed attributes  but as it progresses new data attributes start to pitch in. This has always been the case with all applications that have been made till date.  But solely realizing  that you need to add a few attributes down the line and starting dumpling the complete RDBMS is not a good idea.  I have found that dumping or taking a platform  should not be based on just one assumption. In NoSql dbs you can construct schema less docs. You can add all the attributes for all the new features, but that is just start of things.

One of the most important thing which you should think in this regard is “if you would retrieve data based on the evolving attributes ?.  If the answer to this “No” then I think it is better to not take the NoSql db instead you can create an  RDBMS schema to facilitate the changing nature of things. Have a string field in the table where you can store a JSON. At  a couple of places I have ended up taking this approach and dumping the NoSql stack, as most of the rest of the schema was relational in nature. Thus in order to get complete information joins needed to be be created manually. Also extra care was taken while inserting data. All of this was not required once we adopted “RDBMS with JSON” option.

Now if the answered “Yes” to my question. Then you need to look for how many collections are involved in this way. There cane be the case where a majority of your collections have ended up in RDBMS fashion and not queried. Here also we can migrate a major part of the collections to RDBMS schema and keep only the required parts in NoSQL store

After having a look at few NoSQL applications, I think just as every application has changing attributes in the same manner they have relational entities. So please check your accsess patterns before selecting/ dumpling any store.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: