News for hackers. Stuff that matters.
Re:Common data model mistakes made by startups by andrewprock on Saturday May 22, 2021 @06:35PM (#27250863)
The chance that you don't have constraints set up correctly is indistinguishable from 100%.
Re:Common data model mistakes made by startups by dalyons on Sunday May 23, 2021 @04:11AM (#27253250)
Foreign 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)
Re:Common data model mistakes made by startups by irrational on Saturday May 22, 2021 @09:49PM (#27251807)
I 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.
Re:Common data model mistakes made by startups by ako on Sunday May 23, 2021 @03:09AM (#27252998)
This 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.
Re:Common data model mistakes made by startups by yxhuvud on Sunday May 23, 2021 @03:57AM (#27253187)
I'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.
Re:Common data model mistakes made by startups by cerved on Sunday May 23, 2021 @02:11AM (#27252790)
Not everybody has a DBA :(
Re:Common data model mistakes made by startups by irrational on Sunday May 23, 2021 @01:42PM (#27256918)
Well, 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.