Thursday, June 9, 2011

Better know your NoSQL before leaving SQL

The NoSQL momentum is gaining rapidly. Most of the vendors embracing this new data model. However, there is  lot of misconception and hype is built surrounding this. This article provides few pointers for initial understanding of this new breed of data base.

1.  Is NoSQL is the replacement for SQL

Yes, if you say "YES" to following :
a.Is my data is unstructured ?
b.Do my data access patterns lend themselves to demoralization ?
c.Do I expect lot of schema change in my app ?
d.Can I Drop ACID  properties ?
e.Do I have more complex joins ?

2.  Is  NoSQL means Map Reduce ?
NoSQL is an implementation of a specific type of Data storage Model.  Map reduce is programmatic models to process large data sets. Most of the NoSQL databases offer some kind Map Reduce feature/implementation. That does not mean that we need to necessarily use map reduce to store data. Map reduce is used to extract and aggregate data at large scale from underlined data stores.   So NoSQL is purely a Data Storage platform in other hand Map Reduce is a way to process data.

3.  Can I have both SQL and NoSql  living and breathing  together ?
We can have both SQL based Data Store and NoSQL based data store living together. In most of the cases they will be complementary to each other as they try to solve different problems.

4.  Is NoSQL only for BigData
Truly NoSQL is not merely meant to solve the BigData issue. NoSQL is more popular in BigData use cases as many vendors solved their large scale data problems implementing  NoSQL databases.  NoSQL architecture naturally lends itself to solve today’s Big Data problem. There are lot of vendors still use Relational data store for  their apps. Face Book uses MySql as part of their data base layer. Most of the future apps will be built on polyglot persistency where the same app is built on multiple data models one could be relational and another could be a key and value based NoSQL database.

5.  Which is better performer SQL or NoSQL
The performance of app depends on many factors. We cannot be thinking using NoSQL data store can bring magic and solve all our pains over night. NoSQL is good for some kind of apps which are described above and SQL is good for different kind of apps. Use the data store which is best for solving a specific kind if issue. If I have large no of atom feeds  with different schemas and would not like to store in relational database would be a big pain. Select write data store for a specific  problem. Do not follow the hype of NoSQL use your analytics. NoSQL definitely cannot solve all kinds of problems. For more to understand Horizontal Partition versus Vertical Partitioning go thru (http://venkat-sp.blogspot.com/2009/12/scale-up-versus-scale-out-scale-up-this.html )

6.  Is NoSQL means more CPUs with large scale projects
Not really. I can run MongoDB, Cassandra , Redis in single system. But All these data stores architectures allows data to be partitioned and scale horizontally. In other terms we can have many shards as data grows. This is one of the important feature of any NoSQL databases available in the market and precisely this is the reason why NoSQL DBs are making in roads in big way for scale out problems and majorly seen in Scalable Apps.

7.  Is NoSQL means cloud DB
Most of the cloud vendors store data using some form key values or document kind of data store which helps them to scale out easily. That should not necessarily conclude NoSQL means cloud DBs. Amazon provides Mysql instances ( http://aws.amazon.com/rds/ )  for its customers. Very recently Amazon also support  Oracle instances ( http://aws.amazon.com/rds/oracle/ ). These all are Relational databases.

Please add you comments. Thanks.


No comments:

Post a Comment