Chapter 4: The Enhanced Entity-Relationship (EER) Model
1
CHAPTER 4: THE ENHANCED ENTITY-RELATIONSHIP (EER) MODEL
Answers to Selected Exercises
4.16 No solution provided.
4.17 – Consider the BANK ER schema of Figure 7.21, and suppose that it is necessary to
keep track of different types of ACCOUNTS (SAVINGS_ACCTS, CHECKING_ACCTS,
…) and LOANS (CAR_LOANS, HOME_LOANS, …). Suppose that it is also desirable to keep
track of each account’s TRANSACTIONs (deposits, withdrawals, checks, …) and each loan’s
PAYMENTs; both of these include the amount, date, time, … Modify the BANK schema,
using ER and EER concepts of specialization and generalization. State any assumptions you
make about the additional requirements.
Answer:
4.18 – No solution provided.
4.19 – Identify all the important concepts represented in the library database case study
described here. In particular, identify the abstraction of classification (entity types and
relationship types), aggregation, identification, and specialization/generalization. Specify
(min, max) cardinality constraints whenever possible. List details that will affect the eventual
design but which have no bearing on the conceptual design. List the semantic separately.
Draw an EER diagram of the library database.
Answer:
Chapter 4: The Enhanced Entity-Relationship (EER) Model
3
[Name], address [Address], and telephone number [Phone]. For corporation entities, the data
kept includes name [Name], address [Address], and telephone number [Phone]. The
database also keeps track of the types of planes each pilot is authorized to fly [Flies] and the
types of planes each employee can do maintenance work on [Works_on]. Show how the
small airport EER schema of Figure 8.12 may be represented in UML notation. (Note: We
have not discussed how to represent categories (union types) in UML, so you do not have to
map the categories in this and the following question.)
Answer:
4.22 4.23 No solutions provided.
4.24 – Draw a UML diagram for storing a played game of chess in a database. You may look
at http://www.chessgames.com for an application similar to what you are designing. State
clearly any assumptions you make in your UML diagram. A sample of assumptions you can
Chapter 4: The Enhanced Entity-Relationship (EER) Model
4
make about the scope is a follows:
1. The game of chess is played between two players.
2. The game is played on an 8×8 board like the one shown below:
3. The players are assigned a color of black or white at the start of the game.
4. Each player starts with the following pieces (traditionally called chessmen):
a. 1 king
b. 1 queen
c. 2 rooks
e. 2 knights
f. 8 pawns
6. Every piece has its own set of legal moves based on the state of the game. You do not
need to worry about which moves are legal and which are not other than the following
4.25 No solution provided.
4.26 – Which of the following EER diagram(s) is/are incorrect and why? State clearly any
assumptions you make.
a)
1
N
R
A
B
o
Chapter 4: The Enhanced Entity-Relationship (EER) Model
5
4.27 – Consider the following EER diagram that describes computer systems at a company.
Provide your own attributes and key for each entity type. Supply max cardinality constraints
justifying your choice. Write a complete narrative description of what this EER diagram
represents.
d
U
U
InstalledOS
Monitor
Sound card
N
M
1
1
b)
A
c)
R
A
C
d
o
R
Laptop
Desktop
Keyboard
Mouse
Operating
System
Memory
Video card
d
d
U
U
U
U
U
U
U
SoldWith
Options
Options
Supports
Installed