Primary Key & Foreign Key Basics
Learn Primary Key & Foreign Key Basics (Database Fundamentals, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction A primary key (PK) uniquely identifies each row (unique and NOT NULL, one per table). A foreign key (FK) is a column that holds another table's PK, creating a link and a rule that the referenced row must exist.