News for hackers. Stuff that matters.
Re:"At GitHub we do not use foreign keys, ever, anywhere" (2... by supportengineer on Tuesday January 23, 2024 @09:34AM (#39103790)
Are we discussing constraints, or keys? The term “foreign key” without the word “constraint” totally changes the meaning.
Re:"At GitHub we do not use foreign keys, ever, anywhere" (2... by supportengineer on Tuesday January 23, 2024 @09:37AM (#39103830)
From 4 years ago on the linked page:

“Some comments in the HN thread seem to confuse the logical referential integrity of the relational model, and the FOREIGN KEY constraint, which is a construct where the database enforces the referential integrity.

We do use tables with ‘id’s and tables referencing those ‘id’s. We do not use FOREIGN KEY constraints in our table definitions.”

Re:"At GitHub we do not use foreign keys, ever, anywhere" (2... by philipsd6 on Wednesday January 24, 2024 @12:14PM (#39119820)
As a DBA I feel is this a bit of hand-waving… sure you can say your database model has logical referential integrity: “Parent 1:N Child” but without a referential constraint at the database level it’s just documentation.