3 ms·
> IMHO, the golden rules for database setup are: Typically, these rules are not what people mean when they say they use their DB as a dumb data store. What the
by pyrale 3y ago
> IMHO, the golden rules for database setup are:
Typically, these rules are not what people mean when they say they use their DB as a dumb data store. What they mean is:
- your "schema" is not that important. Sure, you spend a lot of time modeling data in such a way that your application always handles valid data. Once that's done, your DB is "just" a store for that data.
- data integrity is enforced before data reaches the DB. pks/fks are mostly there to ensure fast queries.
The idea is that data in your system should be in a sane state way before it reaches the database, and once it's sane, making more controls at DB level is just a layer of administrative checks done in a language that is not really well-suited for that.
- noisy_boy 3y ago> Typically, these rules are not what people mean when they say they use their DB as a dumb data store. I see - for me and the folks I have worked with, that is what we meant i.e. it does its core competency very well and is "dumb" about business logic.