The Google Firebase Realtime Database is a cloud-hosted database. Data is stored in JSON and synchronized in real time to every connected mobile or other client. It lets developers build rich collaborative applications, with data also persisted locally, to give users a responsive experience.
Google offers two cloud-based, client-accessible database solutions that support real time data syncing:
- Realtime database: is Firebase's original database
- Cloud Firestore: an improved solution with a more intuitive data model. It features richer, faster queries and scales better than the Realtime Firesbase database.
To perform data modeling for Firebase with Hackolade, you must first download the Firebase plugin. Note: the reverse-engineering of documents is not currently available. It is being developed and will be released at a later time.
Hackolade was specially adapted to support the data modeling of data stored as a large JSON tree, with data nodes and their associated keys.
Each Firebase Realtime database data is stored as JSON objects.
There is a fundamental difference with many other NoSQL document databases: Microsoft Azure Cosmos DB strongly suggests to store documents of different types into the same "collection". Pricing is consistent with this recommendation. It may seem counter-intuitive, when moving from a RDBMS or MongoDB, to store record (documents) of a different nature in the same container (collection), but this is done for performance and pricing purposes. A “type” attribute is necessary to differentiate the various objects stored in the collection. Most deployments have a low number of collections, although there is no hard limit.
But having multiple collections is something that can be quite useful for different use cases:
- multi-tenancy: you want to be sure all data are separated
- different types of data requiring different partitioning strategies
Attributes data types
Not applicable, as Firebase does not provide any way to enforce any kind of schema.
Note: the reverse-engineering of documents is not currently available. It is being developed and will be released at a later time.
For more information on Cosmos DB in general, please consult the website.