ITPEC FE Morning April 2019 Question 27
ITPEC FE Morning April 2019 — Question 27 of 80
Referential Constraint — a constraint defined with FOREIGN KEY and REFERENCES.
A referential constraint ensures that a value in one table must exist as a primary key in another table.
SQL syntax:FOREIGN KEY (dept_id) REFERENCES Department(id)
Why not others:
- (a) Assertion — a general database-wide condition using CREATE ASSERTION, not tied to foreign keys
- (b) Check constraint — validates column values locally (e.g., CHECK (age > 0)), no cross-table reference
- (c) Key constraint — applies to PRIMARY KEY or UNIQUE, defines uniqueness, not inter-table relationships
Key rule: FOREIGN KEY ... REFERENCES = referential constraint. It enforces referential integrity between two tables.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.