Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's like database schema design - denormalised schema are often faster for certain queries.

But you should still run a 3NF schema until such time as you actually need that performance, because running a denormalised schema comes with additional complexity cost.



As the old saying goes, "normalize until it hurts; denormalize until it works".


What I've done in these cases is keep the tx database ~3NF and denormalized at some interval to a reporting database [1]. That seems to be a fairly standard way to do things up to a point.

[1] How data gets to the reporting database is implementation specific. Simplest case is run a nightly job to copy the data over. More complex cases use things like data lakes and/or event buses where all interested parties subscribe to data they want. I'm sure there are many others.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: