You are on page 1of 24

Chapter 5

Database Processing
- Case & Exercise
Jason C. H. Chen, Ph.D.
Professor of MIS
School of Business
Gonzaga University
Spokane, WA 99258 USA
chen@jepson.gonzaga.edu
Dr. Chen, Management Information Systems

Part I

Dr. Chen, Management Information Systems

In-class exercise
UYK (p.195)
UYK#5(5-1, 5-2, 5-3); p.195

Dr. Chen, Management Information Systems

5-1.Draw an entity-relationship diagram that shows


the relationships among a database, database
applications, and users.

User

(e.g., GU
students,
faculty, staff
etc.)

Dr. Chen, Management Information Systems

mandatory many

mandatory one

Database
Application

Database

(e.g., ZagWeb,
Blackboard,
Bookstore,
Library, etc.)

(e.g., GU
database)

5-2.Consider the relationship between Adviser and Student in Figure 519. Explain what it means if the maximum cardinality of this relationship
is (A:S Advisor:Student)

a.

b.

c.

N:1
An advisor is assigned one student; a student is assigned many advisors.
1:1
An advisor is assigned one student; a student is assigned one advisor
5:1
An advisor is assigned one student; a student is assigned no more than
five advisors
d. 1:5
An advisor is assigned no more than five students; a student is assigned
one advisor
Dr. Chen, Management Information Systems

3. Identify two entities in the data entry form in Figure 528. What attributes are shown for each? What do you
think are the identifiers?

Fig 5-28
Dr. Chen, Management Information Systems

5-3. Identify two entities in the data entry form in Figure 5-28.
What attributes are shown for each? What do you think are the
identifiers?
Entities (or Tables/Files):
Employee; Class
Employee attributes:
Employee Number, First Name, Last
Name, Email
Class attributes:
Course Name, Course Date, Instructor,
Remarks
Employee identifier (key):
Employee Number
Class identifier (key):
Course Name & Course Date
Why two fields? And what is it called?
Composite Key
Dr. Chen, Management Information Systems

MyMISLab (p.203)
5-17
5-18
MyMISLab (5-17,5-18) p.203

Dr. Chen, Management Information Systems

5-17. Using your answer to question 3, draw an E-R diagram


for the data entry form in Figure 5-28. Specify cardinalities.
State your assumptions.

Employees take zero or more classes; a class is taken by one


or more employees
Assumptions:
1. Courses may be offered many times but always on different
dates.
2. Employees may not have taken any classes.
3. Classes have at least one employee.
Dr. Chen, Management Information Systems

5-18. The partial E-R diagram in Figure 5-38 (next page) is for a
sales order. Assume there is only one Salesperson per SalesOrder.

Dr. Chen, Management Information Systems

10

5-18 (a). Specify the maximum cardinalities for each relationship. State
your assumptions, if necessary.
A Salesperson writes many Sales Orders; a Sales Order is written by one
Salesperson. (Assumes Salespeople work alone and not in teams)
A Customer places many Sales Orders; a Sales Order is placed by one
Customer.
A Sales Order contains many Line Items; a Line Item is contained in one
Sales Order.
A Line Item contains one Item; an Item is contained in one Line Item.
[M]

[M]

[M]

Dr. Chen, Management Information Systems

11

5-18(b). Specify the minimum cardinalities for each relationship. State your assumptions, if
necessary.
A Salesperson may have zero Sales Orders; a Sales Order is written by one Salesperson.
(Assumes Salespeople work alone and not in teams; assumes a Sales Order is not
required for a Salesperson to exist in the system)
A Customer places at least one Sales Order; a Sales Order is placed by one and only one
Customer. (Assumes at least one Sales Order is required for a Customer to exist in the
system)
A Sales Order contains at least one Line-Item; a Line-Item is contained in one and only
one Sales Order.
A Line Item contains one and only one Item; an Item is contained in one and only one
Line Item.

[0]

[>=1]

[>=1]
[1]
Dr. Chen, Management Information Systems

12

Case Study 5:
Searching for Pianos
(pp. 198-202)

Dr. Chen, Management Information Systems

13

Case Study 5: Searching for


Pianos . . .
Certified piano tuner
and technician
repairing and restoring
pianos for many years
Clown entertainer at
childrens parties

Fig 5-31 Deano the Clown


Dr. Chen, Management Information Systems

14

14

Pianos in Storage

Fig 5-32 Pianos in storage


Dr. Chen, Management Information Systems

15
15

Columns in
the Piano
Table

Fig 5-34 Columns in the Piano Table


16

Dr. Chen, Management Information Systems

16

Query Design and Result

Fig 5-36 Results from Query


17
Dr. Chen, Management Information Systems

17

Piano Sound
Quality by
Building

Fig 5-37 Piano Sound Quality by18Building


Dr. Chen, Management Information Systems

18

5-10. Explain why a one-table database could be stored just as


readily in Excel as in Access.
Since Dean is tracking data on just one theme (pianos) he
could use a spreadsheet and adequately manage his piano
inventory.
5-11. Justify the decision to use Access to store the piano
database
Planning ahead and recognizing some of the questions he will
want to answer in the future leads to the conclusion that being
able to query a database will very useful. If a spreadsheet was
used, the answers could only be produced through sorting
methods and would not be very satisfactory.

Dr. Chen, Management Information Systems

19

5-12. Examine the columns in Figure 5-34. Name three


characteristics of pianos that are not represented in this table
Several items come to mind that are not included. Date
acquired, price paid, repairs/renovations needed,
repairs/renovations made; when the sound quality or other
condition features were last assessed.
a). If you were a consultant advising Dean, what criteria should
you and he use in deciding whether to include that additional
data?
Any time changes are being considered to an information
system, the costs and benefits must be weighed. Dean should
consider whether the having the additional facts about his
inventory available will be worth the cost of adding these
fields and filling them in for his existing inventory records.
Dr. Chen, Management Information Systems

20

5-12 (b) Is this database a model of an inventory of pianos, or


is it a model of Deans model of an inventory of pianos?
Explain the difference.
This is a model of Deans model of an inventory of pianos. It
matches his particular situation precisely.

Dr. Chen, Management Information Systems

21

5-14. Using the data in Figure 5-37, draw conclusions about


the effect of location on piano sound quality. Justify your
statements using this data.
It appears that there are more poor sound quality pianos in the
north tent, but there are a couple of caveatsthere are far
fewer pianos stored in the south tent; we dont know how
long any piano has been in the tent; we dont know when the
sound quality was assessed; we dont know the sound quality
when the piano was first stored to know if it has changed
during storage

Dr. Chen, Management Information Systems

22

5-15. Explain the statement A database is an abstraction of


some aspect of a business. Using this example, explain the
ways that processing an abstraction is more effective than
examining pianos. Generalize your observation to databases
for business in general.
The database is an abstraction of the actual inventory of
pianos. It is far more convenient and probably more accurate
to process the database than to attempt to process the actual
pianos spread all over Deans property. This is also true of
databases in business in general. For example, if we have a
database that tells us our inventory levels in three warehouses,
it is far easier to answer questions about what is in stock by
querying the database than going out and looking is all three
warehouses themselves.

Dr. Chen, Management Information Systems

23

5-16. This database will soon become useless if it is not kept up


to date. List procedures that Dean needs to create and follow to
keep his database current.
Dean should have a form he uses to remind him of all the
facts he needs about new pianos he acquires. He must record
every fact he can when a piano arrives and enter it into the
database completely and accurately. When he repairs a piano
the repairs must be recorded for the correct piano. If a piano
is sold or disposed of, it must be deleted or moved into an
archive table

Dr. Chen, Management Information Systems

24

You might also like