ITPEC FE Morning October 2022 Question 26

Source exam: ITPEC FE Morning October 2022Topic: Databases

ITPEC FE Morning October 2022 — Question 26 of 80

Foreign Key Purpose — referential integrity between related tables.

A foreign key ensures that a value in a child table always references an existing record in the parent table.

  • Example: orders.customer_idcustomers.id — cannot insert an order for a non-existent customer
  • Enforces: INSERT and UPDATE are rejected if the referenced row doesn't exist; DELETE of a parent row is blocked (or cascaded)

Why not others:
- (a) Prevent fragmentation — physical storage concern, unrelated to foreign keys

- (c) Restore records after failure — handled by backup/recovery mechanisms

- (d) Speed up searching by co-location — relates to indexing or clustering, not foreign keys

Key rule: Foreign key = referential integrity constraint between parent and child 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.