Mgmt 3830 (N) Final Exam April 17, 2000

advertisement
Mgmt 3830 (N)
Final Exam
April 17, 2000
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. Alberta Lottery Data Model (40 Marks)
The Alberta Government wants to start its own 6-49 lottery, a simplified version of the wellknown national lottery. There will be one drawing each week, in which six unique numbers are
picked from 1 to 49. There is no bonus number and no “plus,” for those of you familiar with the
existing lottery. Customers must correctly guess the six numbers to claim the jackpot, with
smaller prizes for getting three, four or five of the numbers correct. The prize for three numbers
is always $10, and $50 for four numbers. The prizes for five and six (all) numbers correct will
depend on how many tickets were sold. The plan is to pay out about 50% of ticket sales in prizes,
and about 10% in overhead. This leaves 40% for various government programs.
Lottery tickets will be sold in booths in shopping malls, stores, and similar locations. The ticket
sellers will be employees of Lotto Alberta. Each booth has a ticket machine and a telephone,
which is used to connect the ticket machine to headquarters. The telephone can also be used by
the operator to report problems or by headquarters to contact the booth operator. But only Lotto
Alberta can call the booth. Anyone else calling that number will get a busy signal. However, the
operator can call out to any local number from the phone. This feature is provided for emergency
situations. But when using the phone for this purpose, no tickets can be sold. This effectively
discourages personal use of the phone.
The ticket machine has a small monochrome screen, a keyboard and a special printer for the
tickets. The keyboard and screen are used by booth operators when they log in and out of the
system at the start and end of their shifts. They must also log out and back in if they need to take
a break. The system can never be left open and unattended. The keyboard can also be used to
select “Quick Pick” tickets in any quantity. For these tickets, the Lotto Alberta computer
generates the numbers. Other messages can also be displayed on the screen, including a primitive
form of email.
Each location has a cash drawer, since all tickets must be purchased in cash. No cheques, credit
cards or bank cards are currently accepted. At the start of the shift, the employee opens the cash
float envelope, verifies the amount of cash provided, and organizes it in the cash drawer. At the
end of the shift, all cash is taken out and counted. The cash is then deposited at the nearest bank.
The operators enter both the beginning and ending cash amounts for each shift. The bank also
provides this information electronically and it is automatically imported into the system. Thus,
there are two start amounts and two end amounts for each shift – the bank’s count and the
operator’s count. Normally, they are the same but checks can be made if they differ substantially
or consistently. For example, all booths are constantly monitored by video camera to deter theft
and the tapes can be checked if operators are suspected of keeping some of the proceeds.
The machine prints the lottery tickets, showing the date of the draw, the numbers selected (in
ascending order with no duplicates), and a ticket number (partly to prevent fraud). There are also
1
Mgmt 3830 (N)
Final Exam
April 17, 2000
codes indicating where the ticket was bought and who sold it. Security arrangements are
obviously paramount. As noted, the machine is always linked to Lotto Alberta so each sale is
immediately recorded. When the customer chooses a set of numbers, usually entered on a
computer-readable form, the numbers are transmitted to the Lotto Alberta central computer. This
computer then sends back a message containing the selected numbers and the ticket number. In
this way, all printed tickets must have been recorded in the central computer. The operator can
also enter numbers directly for customers who cannot fill out the forms.
Lottery machines currently come from three different manufacturers, but all operate the same
way. Lotto Alberta tracks them using an eight-digit serial number found near the bottom on the
back of the machine. The first digit indicates the manufacturer. Each machine is routinely
serviced every six months for five years. After that, the machine is taken out of service and
replaced. The manufacturers then rebuild the machine, taking advantage of newer technology
and other developments. Some of these rebuilt machines may come back to Lotto Alberta, but
there is no way to know this. They are given new serial numbers (always unique) and are
essentially treated as new machines. Machines are also serviced when the booth operator notices
a problem, but more often the problems are detected first by the computer at Lotto Alberta. The
computer then prints a service request message. The database should track all servicing activity.
While there is some possibility of fraud by booth operators, the more serious concern is with the
service technicians. For that reason, technicians can never redeem a lottery ticket purchased
through a machine they have serviced. The database must be able to track this. Similarly,
operators cannot redeem tickets purchased through their own machines.
Machines are sometimes moved from one location to another. The database needs to be able to
track where machines have been and how to contact the operator at the current location. Each
location has only one machine. While there are malls and stores with two or more machines,
sometimes close to each other, they are treated as separate locations and each has a unique phone
number. The location descriptions must be unique for all machines in operation. However, some
machines may be in the warehouse awaiting allocation and their location is entered as “WH.”
The database tracks all machines, even those that are no longer in operation, and all locations.
This is needed for marketing purposes.
The system must also be able to validate tickets. The machine has a ticket reader that can extract
all the information on the ticket. This information is sent to the Lotto Alberta computer, which
ensures that the serial number and numbers picked match and that the ticket has not already been
redeemed. Winning tickets can be cashed at any location, not just where the ticket was
purchased, and that is also recorded. Winning tickets must be cashed within one year from the
date of the draw, and the Lotto Alberta computer verifies this as well. If the ticket is valid, there
are different procedures for small (three or four numbers correct) and large (five or six) prizes.
For small prizes, the operator normally pays the customer in cash. Occasionally, an operator has
run out of cash the day after the draw so the machine is also designed to print cheques if this
happens. For large prizes, customers must provide identification and a Social Insurance Number.
Names and addresses are recorded. Large payments are always issued by cheque and
arrangements are made by Lotto Alberta, not at the ticket sales locations. While prizes are not
taxed, the government wants to know who is getting the money.
2
Mgmt 3830 (N)
Final Exam
April 17, 2000
Draw a data model for Lotto Alberta based on the information given. You can use either the
textbook notation or the one provided in the class notes, but you should not mix the two. If you
need to make any assumptions, please state them clearly.
2. Access Queries (25 marks)
The Lethbridge Real Estate Board is impressed by your proposed Access database design. The
relationship diagram and Access query format are provided on the final page of the exam. This
makes it easy to remove this page and you can do that if you wish. Some links on the diagram
may be difficult to follow. But the database structure is identical to that used for the assignments,
so it should be familiar to you.
Before implementing the system, the Real Estate Board wants to be sure that the database can
answer some of the questions that have come up recently. They have provided data going back
several years that you have now imported into the database. You can assume the data is errorfree.
Each of the questions should ideally be answered using a single Access query, using the Access
query format. (A copy is provided on the final page of the exam.) Use SQL only if you have to.
But I am not guaranteeing that all questions can be answered with just one query. A correct
answer using two or more queries is better than a incorrect answer using only one. More
importantly, I am not guaranteeing that all 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.
a) How many houses were sold in the city of Lethbridge in 1999? (Use the date the offer was
accepted as the “sold” date.) What was the total value of sales? What was the average sale price?
b) A real estate agent has a client who wants to live in West Lethbridge. Provide a list of all
houses in the area that are currently for sale, have at least 1500 square feet of space, and cost less
than $200,000. Show the address, house size and asking price for each listing. Sort the house list
in descending order by list price.
c) List all houses sold so far this year where the amount paid for the house exceeded the house
assessed value by 10% or more. Show the address, date the offer was accepted, assessed value,
amount paid, and the calculated percentage. Sort on the percentage in descending order.
d) The real estate board is concerned about conflict of interest when a real estate agent represents
both the buyer and the seller. List all sales so far this year (based on the date the offer was
accepted) where that has happened. Show the name of the agent and firm, address of the house,
date the offer was accepted, selling price of the house, and the assessed value. Sort by agent (last
name, first name) and within agent by the date the offer was accepted (in chronological order).
e) List all real estate agents who have represented themselves as either the buyer or seller of a
home. Show the name of the agent and firm, the house address, possession date, and indicate
whether the agent was the buyer or seller. (And yes, this is difficult!)
3
Mgmt 3830 (N)
Final Exam
April 17, 2000
3. SQL Queries (10 marks)
Repeat the first two queries (a and b) from the previous question using only SQL. You can use
the SQL found in the textbook or the SQL that Access generates.
4. Database Terminology and Concepts (20 marks)
The Lethbridge Real Estate Board has also asked you to make a presentation to their executive
committee. You have been asked to prepare answers to the following questions. Your answers
should be concise and appropriate for a non-technical audience. Everyone should understand
your answer, which may require that you clearly define some of the terms. If the question does
not seem to make sense, remember that these are not technical people.
What do you mean by client/server? Who is the client?
Should the system be implemented as a thin or fat client system?
What will your system do to ensure data integrity? Give some specific examples.
Shouldn’t there be a table for “Sale?” This is by far the most important part of the business but
your system doesn’t even mention it. (Do not feel obliged to defend the design in this exam. You
can agree or disagree with the questioner.)
5. Report Design (5 marks)
An Access Report can be built on a query and sometimes on a table. But even when the latter is
possible, most developers prefer to use queries. Why should you build a Report on a query even
when only one table is involved?
4
Mgmt 3830 (N)
Final Exam
April 17, 2000
Lethbridge Real Estate Board Access Relationship Diagram
Field:
Table:
Total:
Sort:
Show:





Criteria:
or:
5
Download