4 comments

[ 3.3 ms ] story [ 20.4 ms ] thread
In this article we will discuss how to translate some advanced fundamentals of SQL into NoSQL in the context of Cloud Firestore.
I haven't read much about Cloud Firestore before. My experience with NoSQL is limited to older (Lotus Notes/Domino). How does this compare to something like MongoDB.
Cloud Firestore and MongoDB are pretty similar in general but have a few key differences:

- Firestore supports nested collections, so a document in one collection can have a subcollection that is scoped to that document. This allows for a kind of hierarchical structuring of your data model e.g. carts are a subcollection of users - Firestore has more limitations on the kinds of queries to can make because every query in Firestore has to be backed by an index. This can be a little annoying but the trade off is that query performance doesn't degrade overtime as datasets grow. - Mongo has a pretty robust aggregation framework that Firestore does not have. With Firestore you need to perform aggregations in you application. - Firestore can be interfaced with directly from a frontend app by using their SDK and a set of security rules that enforce the permission your users have. This SDK supports listening for real time updates which is one of the primary use case of Firestore.

Hope that helps!

Makes sense they're similar considering Firebase was built on mongodb originally