This introduces some terminology frequently used in relations databases.
In a database table, certain columns are keys. Keys help identify rows / records and link records together.
Uniquely identifies a record/row/object/person.
Also uniquely identifies a record/row/object/person
Related tables are linked together by taking the primary key from one table and placing in the related table. The primary key then becomes a foreign key.
In this case, if we had another table that described Institutions’, then the Institution column in the Instructors table would be a foreign key.
The Instructors table, again.
Instructor Table
Primary Key | Foreign Key? | Alternate Key | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
This simplified table contains a number of bad practices, such as the primary and foreign key values used, and naming conventions. We’ll get to those.
Back to Chado Tutorial.