Hacker News new | ask | show | jobs
by talaketu 4155 days ago
> "Normalization’s goal is to eliminate update anomalies. Normalization is not necessary in an immutable data set. The only reason to normalize immutable DataSets may be to reduce the storage necessary."

You can still have an update anomaly in an append-only setting. Teacher changes name (by submitting a change-of-name form) - now you need to replace all the class lists.

2 comments

This can be done in an append-only way, not fast, not efficient but as long as you separate writing the change from committing it in the log, you're fine.
the class list would be rendered by looking up the teacher's name. a rendering can be cached with a timestamp (it was valid as of this time) and then the most recent render can be stored. by setting a dirty flag whenever data changes, you can update dependencies when they are fetched and then memoize the results.
You still need consistent object identities to do that, which are then tantamount to mutability (they are equivalent with equivalent problems related to consistency, and similar solutions).
can you elaborate?