Complete the following test so you can be sure you understand the material. Your answers are private, and test results are not scored.
It's a good idea to think of a relationship as having "sides."
To create a one-to-many relationship, you:
Use the primary key from the table on the "one" side as a foreign key in the table on the "many" side.
Use a junction table with at least two foreign key fields.
Turn off indexing for the primary key field.
To create a one-to-one relationship, you:
Turn off indexing for the foreign key field.
Turn on indexing in the foreign key field, but allow duplicate values.
Turn on indexing for the foreign key field without allowing duplicate values.
Enable referential integrity
Referential integrity is useful because it:
Takes the place of an index.
Keeps primary and foreign key values in synch.
Allows you to "orphan" data safely.
To create a many-to-many relationship between Table A and Table B, you:
Create one-to-one relationships between A, B, and at least two other tables.
Add the primary keys from A and B to a "link" or "junction" table.
Add as many fields as needed from table A to table B, and vice versa, until each table contains all the data you need to track.
This course has taught you everything there is to know about database relationships: