Thus far, we've learned about the syntax and use of constraints using simple test tables. In this section, we take what we've learned and apply it to creating new tables and constraints in our
Companylink tables have been designed as a fully relational model. Each table has an ID column that relates to another table, although no constraints exist. We can take what we've learned thus far and add constraints to our
Companylink tables. Our model is centered on our
employee table, so we can start there.
In this example, we add a primary key to our
Our existing values in the
employee_id column meet the requirements ...