Assignment 1 – Worksheet (120 pts)
Instructions: This Worksheet consists of 13 questions. You may answer each of the first 11 questions using the Colonial Adventure Tours data shown in Figures 1-4 through 1-8 in your eBook. You will find it easier to use the “Colonial Adventure Tours Table.xlsx” Excel file which contains the contents of all five tables. You can copy and paste your answers from the Excel file into this Worksheet. Note: When you paste a value from the Excel file to this Worksheet use the “A” option as shown below:
No computer work is required. The answer to question #1 has been completed for you.
1. List the first and last name of each guide that lives in Maine (ME). Note: There is only one (1) guide.
FIRST_NAME
LAST_NAME
Hal
Rowan
2. (8 pts) List the trip name of each trip that has a maximum group size of greater than 16. Note: There is only one (1) trip. Mod1218
TRIP_NAME
Sawyer River Ride
3. (8 pts) List the trip name and distance of each trip that has the type Hiking and that has a distance longer than 10 miles. Note: There is only one (1) trip.
TRIP_NAME
TRIP_DISTANCE
Sawyer River Ride
16
4. (8 pts) List the trip ID and trip name of each trip that has the type Biking and that has the season Early Fall. Note: There are exactly four (4) trips .
TRIP_ID
TRIP_NAME
5. (8 pts) How many trips have the type Hiking?
6. (8 pts) List the trip name of each trip that has Hal Rowan as a guide. Note: There are exactly five (5) trips .
Hint: Consider starting with the GUIDE table and locate Hal Rowan’s GUIDE_NUM data value. Using that GUIDE_NUM data value look at the TRIP_GUIDES table and locate those records that contain that GUIDE_NUM. You will find five (5) records. The TRIP_ID values of those five (5) records can be used to identify the TRIP_NAMEs in the TRIP table.
TRIP_NAME
7. (8 pts) Find the name of each trip containing the word Loop. Note: There are exactly two (2) trips .
TRIP_NAME
8. (8 pts) List the first and last name of each guide who lives in Maine (ME), Vermont (VT), or Connecticut (CT). Note: There are exactly three (3) guides .
FIRST_NAME
LAST_NAME
9. (8 pts) How many reservations are for trips that occur during July 2016?
10. (8 pts) List the last name of each customer that has a reservation for a trip in Massachusetts (MA). Note: There are exactly two (2) customers. It turns out that one of the customers happens to have reservations for two separate trips. Just list that customer’s last name once.
Hint: Consider starting with the TRIP table to locate those trips in Massachusetts (MA). Then use the RESERVATION table to locate the reservations for those Massachusetts trips. Make note of the customer numbers assocated with the reservations. Finally use the CUSTOMER table to identify the last name of the two customers.
LAST_NAME
11. (8 pts) How many reservations have a trip price that is greater than $15.00 and less than $40.00?
12. (20 pts) You are designing a database that is meant to contain information about books and their authors. Your initial design produced a single table, BOOK, that contains 7 attributes. Shown below is the un-normalized BOOK table with 7 attributes.
BOOK (BOOK_ID, TITLE, IS_HARDCOVER, PRICE, AUTHOR_ID,
FIRST_NAME, LAST_NAME)
After spending more time on the design of the BOOK database you recognize that your un-normalized BOOK table contains both Book information as well as Author information. You need to break up the un-normalized BOOK table (with its 7 attributes) into two separate tables, BOOK and AUTHOR, in order to make your design consistent with 3rd normal form.
Your task is to complete the design of your database in 3rd normal form (using shorthand notation) by replacing each ???? with the appropriate attribute name. Note: Remember in shorthand notation, primary keys are underlined.
BOOK ( ???? , ???? , ???? , ???? )
AUTHOR ( ???? , ???? , ???? )
Complete the functional dependencies of these two tables by replacing each ???? with the appropriate attribute name :
BOOK_ID ???? , ???? , ????
AUTHOR_ID ???? , ????
13. (20 pts) The Colonial Adventure Tours ERD (Entitiy Relationship Diagram with its five (5) tables and list of attributes is shown below. Notice that the CUSTOMER table is missing its list of attribute names.
Your task is to replace the eight ????s in the CUSTOMER table shown below with eight attribute names. These attribute names can be obtained from Figure 1-6 of your eBook or the Excel spreadsheet you used to complete the first 11 questions of this Assignment.
CUSTOMER
????
????
????
????
????
????
????
????
Assignment 1
–
Worksheet
(120 pts)
Instructions
:
This Worksheet consists of 13 questions
.
You may a
nswer each of the first 11
questions using
the Colonial Adventure Tours data shown in Figures 1
-
4 through 1
-
8 in your eBook.
You will find it easier
to use
the “Colonial Adventure Tours Table.xlsx” Excel file which contains the contents of all five tables.
Y
ou can copy and paste your answers from the Excel file into this Worksheet.
Note:
When you paste a
value
from the Excel file to this Worksheet use the “A” option as shown below:
No computer work is required.
The answer to question #1 has been completed for you.
1.
List the first and last name of each guide that lives in Maine (ME).
Note
: There is only one (1)
guide.
FIRST_NAME
LAST_NAME
Hal
Rowan
2.
(8 pts)
List the trip name of each trip that has a maximum group size of greater than 16.
Note
: There is
only one (1)
trip
.
Mod1218
TRIP_NAME
Sawyer River Ride
3.
(8 pts)
List the
trip name
and distance
of each
trip that has the type Hiking and that has a distance longer
than 10 miles
.
Note
: There is only one (1)
trip
.
TRIP_NAME
TRIP_DISTANCE
Sawyer River Ride
16
4.
(8 pts)
List the trip ID and trip name of each trip that has the type Biking and that has
the season Early Fall
.
Note
: There are exactly four (4
)
trips
.
TRIP_ID
TRIP_NAME
5.
(8 pts)
How many trips have the type Hiking?
6.
(8 pts)
List the trip name of each trip that has Hal Rowan as a guide.
Note
: There are exactly
five (5
)
trips
.
Assignment 1 – Worksheet (120 pts)
Instructions: This Worksheet consists of 13 questions. You may answer each of the first 11 questions using
the Colonial Adventure Tours data shown in Figures 1-4 through 1-8 in your eBook. You will find it easier
to use the “Colonial Adventure Tours Table.xlsx” Excel file which contains the contents of all five tables.
You can copy and paste your answers from the Excel file into this Worksheet. Note: When you paste a value
from the Excel file to this Worksheet use the “A” option as shown below:
No computer work is required. The answer to question #1 has been completed for you.
1. List the first and last name of each guide that lives in Maine (ME). Note: There is only one (1) guide.
FIRST_NAME LAST_NAME
Hal Rowan
2. (8 pts) List the trip name of each trip that has a maximum group size of greater than 16. Note: There is
only one (1) trip. Mod1218
TRIP_NAME
Sawyer River Ride
3. (8 pts) List the trip name and distance of each trip that has the type Hiking and that has a distance longer
than 10 miles. Note: There is only one (1) trip.
TRIP_NAME TRIP_DISTANCE
Sawyer River Ride 16
4. (8 pts) List the trip ID and trip name of each trip that has the type Biking and that has the season Early Fall.
Note: There are exactly four (4) trips.
TRIP_ID TRIP_NAME
5. (8 pts) How many trips have the type Hiking?
6. (8 pts) List the trip name of each trip that has Hal Rowan as a guide. Note: There are exactly five (5) trips.