Primary key vs foreign key - mmedrano9438/peripheral-brain GitHub Wiki
Primary keys are used to uniquely identify and index each row within a single table. Foreign keys are used to link rows in two different tables such that a row can only be added or updated in table_a if the value in its foreign key column exists in the relevant column of table_b .