Two tables connected by a constraint that refuses to store a broken reference.

Foreign keys keep references honest

A foreign key makes a relationship enforceable during ordinary database writes. A task can reference an existing project, and the database can reject an unknown project identifier even when an import or a new application code path forgets to check it. The constraint defines referential integrity; it does not decide whether the selected project is the correct one for the business operation. ...

May 25, 2027 · 5 min · XB Field Notes