Data normalization #142
brian-gates
started this conversation in
Ideas
Replies: 1 comment
-
How can we approach this problem incrementally? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
Data is often stored denormalized. For example, instances of
AttackResult
contain fullCharacter
copies for bothattacker
anddefender
adventure-bot/packages/game/src/attack/AttackResult.ts
Lines 5 to 6 in a10ab77
This bloats memory usage and doesn't align well with database storage.
Instead, we could normalize, storing just ids and restoring the original shape with a selector.
Beta Was this translation helpful? Give feedback.
All reactions