MySQL & InnoDB (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What are Foreign Keys and CASCADE constraints?
junior LevelmysqlBasic
In Simple Words: Enforces referential integrity between parent and child tables:
ON DELETE CASCADE: Deleting a parent row automatically deletes all matching child rows.ON DELETE RESTRICT / NO ACTION: Rejects the parent deletion if matching child rows exist.ON DELETE SET NULL: Sets child foreign key columns toNULL.