The more I watch Rick's sessions from 2017, 2018 and 2019, more confused I get - so I guess I'd write it down.
There are 3 core steps (some have more, I want to stick to 3) to create a decent model that works well:
- Understand the usecase + create ERD(list entities and relations)
- Identify the access patterns - R/W workloads, query dimensions and aggregations
- Data modeling - avoid relational patterns, use 1 table(if there aren't any "documents", 1 should be fine)
- R.R.R = Review > Repeat > Review (go on till it makes sense)
Considering the usage of JWT, the need for any other token for authorisation is deemed unnecessary and hence the following set of entities is reduced from:
Entity 1 = User
Entity 2 = Token
Entity 3 = Connection
Entity 4 = Permission
to
Entity 1 = User
Entity 2 = TokenEntity 3 = Connection
Entity 4 = Permission