3 ms·
You assume you will deal with mistakes later and that will be more costly than the effort implement foreign keys. That's a pretty big assumption that has been p
by postalrat 3y ago
You assume you will deal with mistakes later and that will be more costly than the effort implement foreign keys. That's a pretty big assumption that has been proven to be false in many cases.
- gregjor 3y agoImplementing foreign key constraints requires next to no effort -- a single declaration in SQL. You need to think through the schema and the relationships but you have to do that in any case. "Proven to be false in many cases" with not a single example is just an opinion without evidence. The benefit of foreign keys has decades of actual documentation.
- postalrat 3y agoI'm going to assume you didn't read the linked thread because right there are examples of both.
- gregjor 3y agoAssume what you want. Since I specifically mentioned migrations as a not so good reason to avoid foreign keys, in my opinion, I would think it's obvious I read the original article.