Mgmt 3830 Final Exam April 22, 2002

advertisement
Mgmt 3830
Final Exam
April 22, 2002
All questions must be answered in the exam booklets, not on this copy. If you write rough drafts
of answers, or decide to rewrite an answer, be sure you clearly indicate which answer you wish
to have marked. Please note that for all questions, full marks will only be given to answers that
are correct, complete, and clearly written.
1. PharmaCare (50 marks)
A provincial government wishes to introduce a PharmaCare plan that will pay for all or at least
most of the prescription drug costs of its citizens. Officials have prepared the following
description and have asked you to develop a data model that captures the information needed.
Each citizen already has an ID number, issued as part of the existing MediCare system. The
PharmaCare system will use the same ID numbers as the MediCare system so that patient data
can be more easily exchanged. The PharmaCare system must also maintain a record of all
licenced physicians in the province, who are the only people allowed to issue drug prescriptions,
and of all pharmacies and the pharmacists who work in them. PharmaCare will not cover out-ofprovince prescriptions. To be covered, a drug must be prescribed by an in-province licenced
physician and filled at an in-province licenced pharmacy by a registered pharmacist. Some
pharmacists work at more than one pharmacy at the same time, and they often move from one
pharmacy to another during their careers.
Each prescription identifies the physician and patient and lists one or more drugs that the patient
is to receive. (It may also contain non-prescription medicines but these are not part of the
PharmaCare system and will not be recorded.) For each drug, the prescription should indicate the
dosage (drugs often come in different strengths), amount (e.g., 30 pills or 100 ml for a liquid),
and instructions for taking the drug (e.g., one pill three times a day with meals). Unlike common
practice today, prescriptions do not have refills. Patients who need more of the same drug must
get another prescription from a physician. Of course, it does not have to be the same physician
and the patient can go to a new pharmacy. However, patients cannot split a single prescription
among different pharmacies.
The system will record the drug company that supplies each drug. Each drug has only one
supplier. However, there are often equivalent drugs offered by different companies under slightly
different names. The system should record these equivalents, and physicians are encouraged to
check the system and find the cheapest version when issuing a prescription. Drugs can also
interact with each other. When an interaction is known, this should also be recorded and the
system should be capable of generating warnings to patients about these problems (assuming all
their drugs are acquired through Pharmacare). Interactions with non-prescription drugs (e.g.,
Aspirin) or other substances (e.g., grapefruit juice) will not be recorded in this system.
Each dosage of each drug has a cost to the government, which can change over time. These costs
must be recorded so that pharmacies can be properly reimbursed. You should assume that all
pharmacies in the province will pay exactly the same amount for each drug ordered on a
particular date, regardless of the amount ordered. (The cost will vary by dosage but, for example,
the cost per pill to a pharmacy is the same for 10 pills as 10,000 pills.) Drug costs will vary over
time, and can go up or down. There are no taxes (e.g., GST or provincial sales taxes) on
prescription drugs and none are planned, so the system can ignore them.
1
Mgmt 3830
Final Exam
April 22, 2002
The government is concerned about abuse of its PharmaCare system, particularly by physicians
and pharmacists. The system should allow easy tracking of prescriptions issued to physicians or
pharmacists by another physician. Physicians are not allowed to prescribe drugs for themselves
and the system should be able to detect if that occurs.
2. Hair Shoppe Queries (20 marks)
A copy of an Access table design for Hair Shoppe (very similar to the one you used) and the
Access query format are provided on the final pages of this exam. Create queries to answer the
following questions. Use a single Access query for each, if possible. However, a correct answer
using two or more queries is better than an incorrect answer using only one. More importantly,
there is no guarantee that either of these questions can even be answered. If you believe the
database cannot answer the question, explain why and do the best you can to provide some
useful information. You do not need to draw the full relationship diagram, but you should
indicate which tables (or queries if you need more than one) are involved.
a) Daily Cash Discrepancies
Ideally, the difference between a day’s ending and starting cash position (based on physical
counts) should equal the amount of cash payments received as recorded in the database.
Write a query that will show any date in the current month where the cash received exceeds
the amount counted by more than $5.00. Show the date, the total amount of cash payments
recorded, the starting and ending amounts as counted, the difference between the starting and
ending amounts, and the discrepancies between the actual amount and the recorded amount.
b) Product Use
Janice Ingels has just used a bottle of hair coloring and the results were not what she (or the
customer) expected. The bottle was only half full, so Janice knows that someone else has
been using it. She would like to know which of her colleagues have used the same bottle on
customers. She would like to know the names of the employees, the dates they used it, and
the amounts applied.
3. Normalization (10 marks)
What does it mean to say a database is in “Third Normal Form?” Provide a basic definition. To
better explain your answer, give an example of a table(s) in First Normal Form but that should be
changed to Third Normal Form. Clearly show why this violates Third Normal Form and how you
would change the table(s) design so that Third Normal Form conditions are met.
Is Third Normal Form sufficient? Why or why not? You do not need to provide an example for
this part, although you can if you wish.
2
Mgmt 3830
Final Exam
April 22, 2002
4. System Errors at Hair Shoppe (20 marks)
A system is only as good as the data it contains. For the Hair Shoppe chain, identify some of
errors that could occur in using your system and what the cost might be to individual outlets or
the chain itself.
Next, focus specifically on the processes of making Appointments and obtaining payment for
services. One or more Access Forms will be needed to do this. What can be done to help prevent
errors in these processes? Where relevant, provide a general (high level) description of how you
would use Access to help achieve this goal.
You need to think broadly in answering both these questions.
3
Mgmt 3830
BUSINESS
*BusinessID
BizName
BizAddress
BizCity
BizProv
BizPostalCode
BizPhone
BizFax
BizEmail
BizURL
BizLogo
LOCATION
*LocID
LocAddress
LocCity
LocProvince
LocPostalCode
LocPhone
LocFax
LocEmail
Final Exam
CUSTOMER
*CustomerID
CustFirstName
CustLastName
CustPhone
CustGender
CustBirthDate
CustNotes
LocID
APPOINTMENT
*AppointmentID
AppDate
AppTime
AppStartTime
AppEndTime
AppPaymentMethod
AppPaymentAmount
AppNotes
CustomerID
CouponID
SERVICE_PRICE
EMPLOYEE
*EmployeeID
EmpFirstName
EmpMiddleName
EmpLastName
EmpAddress
EmpCity
EmpProvince
EmpPostalCode
EmpPhone
EmpEmail
EmpHiredDate
EmpTerminatedDate
EmpSIN
EmpNotes
LocID
*ServicePriceID
ServPriceStartDate
ServPriceEndDate
ServPrice
ServiceID
April 22, 2002
DATE
*Date
StartCash
EndCash
DepositCash
GST
HourlyWage
DateNotes
PRODUCT
*ProductID
ProdName
ProdDescription
ProdColor
ProdNotes
PRODUCT
USED
COUPON
*CouponID
CouponValue
CouponPercent
CouponExpiry
CouponTerms
*ProductID
*AppointmentID
*ServicePriceID
SERVICE
SHIFT
*ShiftID
ShiftScheduleStart
ShiftScheduleEnd
ShiftStart
ShiftEnd
EmployeeID
*ServiceID
ServName
ServCategory
ServLength
ServCommission
APPOINTMENT
SERVICE
CUSTOMER
PREFERENCE
*CustomerID
*EmployeeID
PrefLevel
*ServicePriceID
*AppointmentID
ShiftID
4
Mgmt 3830
Final Exam
April 22, 2002
This Access Query format is provided as a guide only. Please put any answers you want marked
into the exam booklet. Do not submit this sheet with your exam.
Field:
Table:
Total:
Sort:
Show:





Criteria:
or:
5
Download