Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

I'm not a real specialist on this but from what I read, here's what my perception :

  • most of the time, schemaless databases enable you to easily store Key / Values, JSON objects. So it's often quite easy to bridge the objets you manipulate in your application to the DB storage. You don't have to use an ORM (Object Relational Mapper) because your objects are directly in the format accepted by the DB (most of the time, it's quite easy to generate a JSON from the object you have in an app)

  • If you don't have any schema, you can easily adjust (add / remove) the properties of the objects you want to store in your DB without having to go through a schema update and a migration of the data from the old schema to the new one.

  • in the CONs for the schemaless, my feeling is that you cannot express as many constraints as you could do in standard SQL to retrieve data (you don't do any join etc) so maybe you have to really check how you want to retrieve stuff from the db data and see what is offered by the schemaless engine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top