Recently i got to know about BaaS, A kind of service which is used to store data online in persistence format.
I have check parse.com
and firebase.com
. I am want to know how they store the data.
In parse.com
you create a Parse object which is viewed as table in online portal.
In firebase.com
its a kind of tree(I am not aware right now)...
On what basic principle these BaaS providers organizes data. Are they following any generic design pattern.
How to make logical schema generic to store in such BaaS Provider's storage
There's lot of different BaaS services, and they use various internal DBs, so I'm not sure they all share the same data structures.
For the ones you're referring to, and for most of them, the basic data element is the JSON object (i.e. a tree of key/value pairs), usually called "object" or "document". In most cases, the data model can be created "on the fly", just by adding objects in the DB.
For Firebase, the entire database is more or less a single JSON tree, and you can do (very) basic queries on subtrees.
For Parse.com and other based on MongoDB, the schema and queries are a bit more sophisticated (the objects are grouped in collections).
Some others (IBM Cloudant,...) use CouchDB, a NoSQL DB like MongoDB.
Some others (Baasbox,...) use a SQL-like language for queries and/or allow SQL-like relationships between collections/tables.
So if your data is a bunch of JSON objects without dependencies to each others, you have a vast choice of backends. If your data model and queries are more complex, you'll be more restricted.