I am wondering why aggregation (like SUM) is not built into Firestore when other NoSQL databases like MongoDB has them. Is it inherent to the design of firebase? Do you think it can be added soon?
I am wondering why aggregation (like SUM) is not built into Firestore when other NoSQL databases like MongoDB has them. Is it inherent to the design of firebase? Do you think it can be added soon?
This is a good question, actually.
Firestore was built for some certain use cases, that are not the use cases MongoDB is built for. MongoDB can be used for a lot of use cases, even those covered by Firestore.
Basically, the main idea behind the dev team was that they wanted to build a document database, easy to use, managed and lightweight. This led to making it without features like shardings, or aggregations, and so on, but still, the dev team knew some of them would be useful. So they decided to leverage the possibilities offered by a cloud platform, and built it to support everything the platform (Firebase) could offer: Firebase Functions.
So, in the end, the answer is: