Hacker News new | ask | show | jobs
by gyam 1779 days ago
I want to learn these. How do I start learning good modelling techniques? Are the NFs you’re referring to is same as in DB design? If so, how does that translate to general code/system design. Any pointers you can provide for learning material, concepts, or books will be greatly appreciated. Thanks!
2 comments

> Are the NFs you’re referring to is same as in DB design?

Yes

> If so, how does that translate to general code/system design.

SQL is capable of evaluating any logical outcome you would need to know about. It can be extended with application-defined functions to add convenience and a domain-specific dialect that aids in implementation speed.

Best way to learn is to start experimenting with practical problem domains. Pick a problem you care about and start modeling it over and over. 6NF followed to the extreme is actually pretty hard to get wrong. Just find the things that you need to uniquely refer to by some identity, then relate all the knowledge to them by way of single-fact tables (which can be further related and extended to add dimensions like change-over-time).

Understanding how abstract dimensions fit together is 99% of the battle. You just have to hurt yourself on some sharp edges a few times to really grasp it in my experience.

Thanks for the suggestions!
The Codd 1971 stuff on Wikipedia looks like a mess, and I think the original is propbably a bit crufty too (though I don't want to disrespect the old masters, SQL was a high water mark of business thinking about computing in many ways).

I would follow the citations of https://ncatlab.org/nlab/show/lens+%28in+computer+science%29 instead. Whatever Spivack can say about this stuff I think is going to be much more worth your while.

Looking at https://arxiv.org/pdf/1602.03501.pdf now.

There is a book by c.j date that goes into these . It is very theory based and heavily criticises people for confusing relation and table . Book is Database Design and Relational Theory: Normal Forms and All That Jazz
Thanks for these!
I feel bad as this stuff is certainly much harder. But yes I do think it's important to try to understand databases in a modern setting and not some old set theoretic cludge that's hard to relate to anything else.

Good luck!