I can't think in NoSQL (and neither can you)
If you're like me, a programmer taught how to think in terms of relational databases, you just can't design a NoSQL. Wait. No one can design a proper NoSQL database for relational data because it's a data store built on tradeoffs.
I have very relational data that I am being forced to feed into Firebase just because of how convenient Firebase is to set up. Here's a simplified problem statement:
- There are Users, each of whom has an email, name, and gender.
- These users can be friends, and have to consent to their friendship - sent, pending, and accepted.
- Create a NoSQL json table such that there is no duplication of data, and each user is able to query a list of their friends including invites with all the user details.