Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advantage of schemaless data storing over data storing with schema

I want to choose a back end web service for my app. Reading documentation of these services(Parse, Proxomo, Cocoafish, StackMob etc.) reveal that some of them offers to store data in schemaless form while other mention that schema must be specified apriori. I understand what is schema of data is and hope schemaless will be easy to use, but want to know merits and demerits of each. Any explanation will be greatly appreciated.

like image 938
chatur Avatar asked Jan 24 '12 12:01

chatur


1 Answers

The biggest difference is scalability.

Data storage solutions with schema are much harder to distribute than Schema free data storage solutions. Its really easy to replicate (schema free) key-value pairs for fault-tolerance. Its really easy to distribute copies across nodes for fast read times and its easier to provide fast writes with eventual consistency. If you are managing your own database this means it will be much easier to manage schema free solutions when you need to scale to multiple servers. If you are using a service this means schema free solutions are normally cheaper and faster.

The problem with schema free comes when you need transactions and consistency across various data-sets or tables. All this has to be done in code.

So the bottom line is: If you need huge volume data with fast access cheap it has to be schema free. If on the other hand your data size and load is modest than schema based systems are better.

If you need help choosing which service to go with, A better way to decide would be to do a read/sec write/sec and expected data size analysis on your application and then choose which solution is cheaper. All of these services will presumably scale to your loads but the cost will be the deciding factor.

like image 163
Usman Ismail Avatar answered Nov 09 '22 03:11

Usman Ismail