21.9. Three kinds of keys

Now that we have started building a data model putting our data into multiple linked tables and linking the rows in those tables using keys, we need to look at some terminology around keys. There are generally three kinds of keys used in a database model.

We are using a naming convention of always calling the primary key field name id and appending the suffix _id to any field name that is a foreign key.

You have attempted of activities on this page