Firebase is a suite of tools for web and mobile applications.
Data is saved and queried in a tree structure.
- fetch data at a location in your database, you also retrieve all of its child nodes.
- grant someone read or write access at a node in your database, you also grant them access to all data under that node
For a two-way relationship, the relationship needs to be duplicated (ie saved twice). The relationship is saved:
- in the user's record
- and under the group.
So to delete a user from the group, it has to be updated in two places. This is a necessary redundancy for two-way relationships in order to scale.
Cloud Firestore is a document database.