To Lecture Notes

LSP 121 -- 10/21/10

 

Review Questions

  1. True or False: the primary key must be the first column in the table.

    Ans: False. The primary key can be any column or combination of columns in the table.

  2. In this PersonData table could Age be used as the primary key?

    PersonData
    FirstName ID Gender Age
    Judy 5555 F 27
    Shawn 2222 M 31
    Alice 8888 F 36

    Ans: Access would not show an error if Age were used as the primary key because all the Age fields are different. However, Age would not be a good to use for a primary key because the ages of two persons in the table could easily be the same if more rows were added.

  3. What is the difference between importing into and exporting from an Access database?

    Ans: Importing into an Access database means taking the data in a .txt or .xls file and converting it to an Access table. Exporting means taking an Access table and converting it to some other format (like .txt or .xls).

  4. Using the table SwimDriveAge in the database ages.accdb, answer the following questions by creating filters:

    1. Who are the persons that can drive, but they can't swim.

    2. Who are the persons that learned to swim after the age of 16.

    3. Who are the persons that learned to swim after they learned to drive.

    Ans: Use these advanced filters:

    Problem a:
    Field: CanDrive CanSwim
    Sort:    
    Criteria: Yes No

    Problem b:
    Field: CanSwim AgeLearnedToSwim
    Sort:    
    Criteria: Yes >16

    Problem c:
    Field: CanDrive CanSwim AgeLearnedToSwim
    Sort:      
    Criteria: Yes Yes >[AgeLearnedToDrive]

 

Database Normalization

 

Examples for Homework 4

 

Relationships Between Tables

 

Access Queries

 

Aggregate Queries

 

Activity 10