Tables and Integrity Constraints TYPE A: Very Short Answer Questions
Tables and Integrity Constraints TYPE A: Very Short Answer Questions
Whenever two tables are related by a common column (or set of columns), then the related column(s) in the parent
table (or primary table) should be either declared a PRIMARY KEY or UNIQUE key and the related column(s) in the
child table (or related table) should have FOREIGN KEY constraint.
For example, if there are two tables:
Items (Itemno, Description, Price, QOH)
Orders (Orderno, Orderdate, itemno, Qty)
Both the tables are related through common column Itemno.
The column Itemno is primary key in parent table Items and it should be declared as foreign key in the child table
Orders to enforce referential integrity.