Data modeling in NoSQL is trickier than normal SQL. Sometimes, it goes against our intuition. Especially coming from an SQL background, I found it hard to comprehend the various reasons behind the data modeling in NoSQL databases like AWS DynamoDB or Firebase. By Mohammad Faisal.
The article explains three strategies for modeling one-to-many relationships and the scenarios in which you can use them:
- Denormalization + Complex Attribute
- Denormalizaton + Duplication
- Composite Primary Key + Query
Denormalization is a dirty word for SQL developers. But in the NoSQL world, it has its use cases. Designing a NoSQL database is no joke. You have to put a lot of effort into designing one and think about all the possible access policies beforehand. Otherwise, you can’t revert or change the data modeling very easily down the road. Good read!
[Read More]