6 - QRC

advertisement
ISP 121 Assignment 6 More on databases
For each of the following databases, describe the tables that would organize the data in a
normalized fashion. Rewrite the field names under an appropriate name for tables. Put
the initials PK next to each primary key and put the initials FK next to each foreign key.
1. Personnel Database
First Name
Last Name
Address
City
State
Zip
Employee Phone Number (repeats 1-n times)
Phone Number
Type of Phone (home, cell, work, etc.)
Annual Income
Insurance Provider Name
2. Daycare Database
Parent Last Name
Parent First Name
Parent Address
Parent City
Parent State
Parent Zip
Phone (repeats 1-n times)
Phone Number
Type of Phone
Child Info (repeats 1-n times)
First Name
Age
Allergies
3. CD Database
Title of CD
Artist
Year Recorded
Genre (rock, pop, hiphop, etc.)
Year Purchased
Track Info (repeats 1-n times)
Track Title
Track Length
4. Real Estate Agent Listings
Listing Table
Listing ID
Address
City
Number stories
Frame type
Basement?
Heating type
Taxes
School district
Number of bedrooms
Room Info (repeats 1-n times)
Width
Length
Flooring Type
Agent Info (repeats 1-n times)
Agent ID
Agent Name
Agent Table
Agent Name
Agent ID
Address
City
Phone
Listing Info (repeats 1-n times)
Listing ID
5. Import the Excel file FuelEfficiency.xls into an Access database. Perform each of the
following queries (in some cases you can just filter and sort) and paste the results of each
query into your Word document.
a. Find the car (or cars) with highest City MPG.
b. Find the car (or cars) with the lowest City MPG.
c. Find the car (or cars) made by Chrysler that has the highest City MPG.
d. Find how many cars are classified as gas guzzlers. (If you buy one of these cars, you
need to pay a gas guzzler tax.)
e. Find the average City MPG of all cars that have rear wheel drive (these have an R in
the DRIVE SYS column).
f. Find the average City MPG of all cars that have front wheel drive (these have an F in
the DRIVE SYS column).
g. Find all 4 wheel drive cars with a City MPG greater than 30.
Download