If you have finished task 05.01 ...

your tables should be set up and ready to relate.

All the tables in this database are in either one-to-many or many-to-many relationships

What about the relationship between the Orders table and some other table in the database?

You will need to decide whether or not you need to create a one-to-many or a many-to-many relationship between the Orders table and another table

Let's establish some rules for this database that may assist in deciding the relationships

however, you only have to do this in regards to the Order table. You must decide what field in the Order table is the FK and what PK in another table it should be related to

your task is to decide on the relationship and link the related fields

You have a many-to-many relationship between Book and Author,

but in Access you must create the many-to-many relationship by creating an intervening table and relating the Book and Author tables to it as two separate one-to-many relationships

the intervening table has its own Primary Key for each new record and also contains copies of Primary Keys of the two related tables, inserted in the intervening table as Foreign Keys

this intervening table will allow the two original tables to relate to each other in a Many-to-many relationship

[top]

I will be looking for the following in your related tables

  1. Primary Keys (for each table)
    • Orders Table PK
    • Book Table PK
    • Publisher Table PK
    • Author Table PK
    • BookAuthor Table PK
  2. Lookup Tables (to look up Foreign Key values in different tables)
    • use the Lookup Wizard on the Foreign Key field in the appropriate tables in order to create a Lookup Table relationship that you may then use to enter Foreign Key values into tables as you create new records in those tables
    • once you have identified the fields that will be your Foreign Keys, use the lookup wizard to create the relationship to their associated Primary Key in another table
  3. Relationships: enforce referential integrity on all relationships

[top]

This is the second part of your Task 05

[top] [preparations for next session]