For a more detailed description search access help

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: who are not in the university database cannot take courses. Referential integrity also defines what should happen in the COURSE SIGN ­UPS if a student record were to be deleted from the STUDENT INFO. Relating Tables In this section you will establish the relationships necessary to make the practice database a truly functional relational database. Keep in mind that when you design a database for a real application, most of the structure of the database, including the relationships, is complete prior to entering any data. Because we do not have time to add information to the database in the lab, we started with tables with some data. Let’s relate the three tables for which we set the primary keys earlier, STUDENT INFO, COURSE OFFERINGS, and COURSE SIGN ­UPS. First, open all three tables in the Datasheet View to see what fields they have in common. The Student Info and Course Sign ­ups tables have the SSN field in common, and the Course Offerings and Course Sign ­ups tables have the CRN field in common. Follow these steps to relate the three tables. 1. Close all the tables you plan to relate. 2. Open up Relationships: Under OS ­X: Under Windows: Click on Relationships in the Database Tools In the Menu Bar click on Tools and select tab of the Ribbon Interface. Relationships. 3. A blank Relationships window should appear. This window is like a canvas on which you add tables and set the relationships. Notice the menu options and toolbar items have changed . 4. Now add tables in the Relationship window: Under Windows: Under OS ­X: Select the Show Table icon from the Design The Add Table window should Tab in the Ribbon Interface automatically appear. Click on Course Offerings in the Show Table dialogue window that appears, and then click on Add . Repeat the process until you have added Course Sign ­ups and Student Info. Move and resize the table windows until you can see all fields and you have space to add the relationships. Close the Show Table window. 5. 6. To create a relationship between the Student Info and Course Sign ­ups tables, click and drag from the SSN field in one table to the SSN field on the other. It doesn’t matter which table you start from. 7. The Edit Relationships window will appear on the screen. Notice that at the bottom of the window under “Relationship Type” it says “One ­To ­Many.” Click on the box that says Enforce Referential Integrity. This feature prevents SSNs that are not in the Student Info table from 13 Workshop 6: MS Office Access and NeoOffice being entered in the Course Sign ­ups table. The check boxes at the...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online