Integrity Constraints and the Relational Derivative

from blog NULL BITMAP by Justin Jaffray, | ↗ original
In a SQL database, you can set up a foreign key with REFERENCES: nullbitmap=# CREATE TABLE ab (a INT PRIMARY KEY, b INT); CREATE TABLE nullbitmap=# INSERT INTO ab VALUES (1, 10), (2, 20), (3, 30); INSERT 0 3 nullbitmap=# SELECT * FROM ab; a | b ---+---- 1 | 10 2 | 20 3 | 30 (3 rows) nullbitmap=# CREATE TABLE xa (x INT PRIMARY KEY, a INT...