4 ms·
The chance that you don't have constraints set up correctly is indistinguishable from 100%.
by andrewprock 5y ago
The chance that you don't have constraints set up correctly is indistinguishable from 100%.
- irrational 5y agoI disagree. Any fairly competent DBA will know how to setup the constraints correctly. It's not rocket science. If you can think logically enough to program, you can think logically enough to set up constraints correctly.
- cerved 5y agoNot everybody has a DBA :(
- irrational 5y agoWell, my team has never had an official DBA either. But we do all the tasks of a DBA. I've installed/upgraded, configured, tested backups, and hardened Oracle and Postgres more times than I can remember. We do all our own DML and DDL work. It really isn't hard to do it right.
- ako 5y agoThis should be the responsibility of the application developer creating the database schema and queries. A constraint is part of your application logic, not of the administration of the database.
- yxhuvud 5y agoI've yet to see anything I'd consider calling a startup having a DBA. I'm positively impressed if they even default to use foreign keys.
- dalyons 5y agoForeign key constraints are a waste of effort for most at-scale web apps. They guard against a subset of problems that aren’t actually problems (orphaned rows) at a putative cost (for the db)