MySQL terminology “constraints” vs “foreign keys” difference?
Yes, a foreign key is a type of constraint. MySQL has uneven support for constraints: PRIMARY KEY: yes as table constraint and column constraint. FOREIGN KEY: yes as table constraint, but only with InnoDB and BDB storage engines; otherwise parsed but ignored. CHECK: parsed but ignored in all storage engines. UNIQUE: yes as table constraint … Read more