Practice Problem 13.2 Solution

PRACTICE PROBLEM 13.2 CONFERENCE REGISTRATION SOLUTION
The Conference-Registration database above consists of the following tables:
 Attendees: List of all attendees of this annual conference. A unique id # is associated with each
attendee. Note that some attendees have not yet registered for specific services but have been
included since they have indicated their desire to attend.
 Rates: List of the different conference services and rates, by unique service code. Attendees may sign
up for one or more service code items or the all-inclusive fee which covers all services.
 Registration: List of all this year’s conference registrations by attendee by service (i.e. attendee #7 is
signed up for both A and B – class tuition and exam).
 Payments: List of this year’s payments including the amount, date, and payment method.
1. Create a relationship diagram for the Conference Registration database
a. Identify the primary keys and foreign keys
b.
Establish the relationships between each table
FK: Id# on Registration
FK: ServiceCode on Registration
FK: Id# on Payments
FK: Method on Payments
2. Has referential data integrity been violated between any tables? If so, identify the orphans.
NO.
Using the QBE grids provided, write a query or set of queries to answer the following questions. Name the
query by the question number. If more than one query is required for a specific question, name each query by
the question number plus A, B, etc. Assume that the data provided is only a part of the data base and the
Referential Data Integrity is enforced for all relationships.
1. List the full name, and exam description of all attendees planning on taking any of the exams during
the conference. All exams will have the word, “exam” in their description.
2. Summarize the payments made for all Ohio Attendees. List only the total amount of payments.
3. Summarize the payments made by payment method. Include the method id, method description, total
value of the payments, the average payment value and the minimum payment value.
4. Summarize the amount owed by attendee that details the total charges, total payments, and the total
amount still owed by the attendee based on their registration charges and their payments. Please list
the Employee# First Name, charge amount, and payment amount of all attendees.
5. A 5% late fee is being assessed on the outstanding balances (amount owed calculated in query 4C).
Please list, by attendee (id#, last name), the original amount owed, the late fee and the new balance.
Query Name: Query 1
Tables Required: Attendees/Registration/Rates
**Join On: Id#/ServiceCode
Join Type: Inner
Field
FName
LName
Table
Attendees
Attendees
Total
Sort
Show
X
X
Criteria
OR
OR
Additional Room for Expressions if needed:
Description
Rates
X
Like “*Exam*”
Query Name: Query 2
Tables Required: Attendees/Payments
**Join On: Id#
Join Type: Inner
Field
Payment
State
Table
Payments
Attendees
Total
Sum
Where
Sort
Show
X
Criteria
“OH”
OR
OR
Additional Room for Expressions if needed:
Query Name: Query 3
Tables Required: PaymentMethods/Payments
**Join On: Method
Join Type: Inner
Field
MethodID
Method
Payment
Table
PaymentMethods PaymentMethods Payments
Total
Group By
Group By
Sum
Sort
Show
X
X
X
Criteria
OR
OR
Additional Room for Expressions if needed:
Payment
Payments
Avg
X
Payment
Payments
Min
X
Query Name: Query 4A
Tables Required: Attendees/Registration/Rates
**Join On: Id#/ServiceCode
Join Type: Outer
Field
Id#
LName
Table
Attendees
Attendees
Total
Group By
Group By
Sort
Show
X
X
Criteria
OR
OR
Additional Room for Expressions if needed:
Fee
Rates
Sum
X
Query Name: Query 4B
Tables Required: Attendees/Payments
**Join On: Id#
Join Type: Outer
Field
Id#
Payment
Table
Attendees
Payments
Total
Group By
Sum
Sort
Show
X
X
Criteria
OR
OR
Additional Room for Expressions if needed:
Query Name: Query 4C
Tables Required: Query 4A/Query 4B
**Join On: Id#
Join Type: Inner
Field
Id#
LName
Table
Query 4A
Query 4A
Total
Sort
Show
X
X
Criteria
OR
OR
Additional Room for Expressions if needed:
SumOfFee
Query 4A
Amount Owed: Nz([SumOfFee],0)-Nz([SumOfPayment],0)
X
SumOfPayment Amount Owed*
Query 4B
X
X
Query Name: Query 5
Tables Required: Query 4C
**Join On: None
Join Type: None
Field
Id#
LName
Table
Query 4C
Query 4C
Total
Sort
Show
X
X
Criteria
OR
OR
Additional Room for Expressions if needed:
Late Fee: [SumOfFee]*0.05
New Balance: [Late Fee]+[SumOfFee]
SumOfFee
Query 4C
X
Late Fee*
X
New Balance*
X