The Google Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform.  Like Firebase, it keeps data in sync across client apps through relatime listeners, and offers offline support for mobile and web, so developers can build responsive apps that work regardless of network latency or Internet connectivity.

                                                                       .

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.


Given the differences between the 2 approaches, data modeling for the RealTime Firebase requires a separate plugin.


To perform data modeling for Firestore with Hackolade, you must first download the Firestore 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 in collections, nested objects, and subcollections.

Databases


Collections


In Firestore, data is stored in documents, which are organized into collections.  Each document contains a set of key-value pairs. Cloud Firestore is optimized for storing large collections of small documents.  All documents must be stored in collections. Documents can contain subcollections and nested objects, both of which can include primitive fields like strings or complex objects like lists.  Collections and documents are created implicitly in Cloud Firestore. Simply assign data to a document within a collection. If either the collection or document does not exist, Cloud Firestore creates it.


Subcollections are an implementation of multi-table inheritance


IDs


The unique key is based on a timestamp, so list items will automatically be ordered chornologically.  The Firebase JavaScript clients provide a push() function that generates a unique ID, or key, for each new child.



Attributes data types


Indexes


Forward-Engineering

Not applicable, as Firestore does not provide any way to enforce any kind of schema.


Reverse-Engineering

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.