DatabaseSystemsTheCompleteBookSolutio
sforChapter2
Solutio
sforSectio
21
Exercise211
TheERDiagram
Exercise218a
TheERDiagram
Solutio
sforSectio
22
Exercise221
TheAddressese
titysetis
othi
gbutasi
gleaddresssowewouldprefertomakeaddressa
attributeofCustomersWeretheba
ktorecordseveraladdressesforacustomerthe
itmightmakese
setohavea
Addressese
tityseta
dmakeLivesatama
yma
yrelatio
shipTheAcctSetse
titysetisuselessEachcustomerhasau
iqueaccou
tsetco
tai
i
ghisorheraccou
tsHoweverrelati
gcustomersdirectlytotheiraccou
tsi
ama
yma
yrelatio
shipco
veysthesamei
formatio
a
delimi
atestheaccou
tsetco
ceptaltogether
Solutio
sforSectio
23
Exercise231a
KeysssNoa
d
umberareappropriateforCustomersa
dAccou
tsrespectivelyAlsowethi
kitdoes
otmakese
sefora
accou
ttoberelatedtozerocustomerssoweshouldrou
dtheedgeco
ecti
gOw
stoCustomersItdoes
otseemi
appropriatetohaveacustomerwith0accou
tstheymightbeaborrowerforexamplesoweput
oco
strai
to
theco
ectio
fromOw
sto
fAccou
tsHereistheTheERDiagram,
showi
gu
derli
edkeysa
dthe
umerocityco
strai
t
Exercise232b
IfRisma
yo
efromE1toE2the
twotuplese1e2a
df1f2oftherelatio
shipsetforRmustbethesameiftheyagreeo
thekeyattributesforE1Toseewhysurelye1a
df1arethesameBecauseRisma
yo
efromE1toE2e2a
df2mustalsobethesameThusthepairsarethesame
Solutio
sforSectio
24
Exercise241
HereistheTheERDiagramWehaveomittedattributesothertha
ourchoiceforthekeyattributesofStude
tsa
dCoursesAlsoomittedare
amesfortherelatio
shipsAttributegradeis
otpartofthekeyforE
rollme
tsThekeyforE
rolleme
tsisstudIDfromStude
tsa
ddepta
d
umberfromCourses
Exercise244b
HereistheTheERDiagramAgai
wehaveomittedrelatio
ship
amesa
dattributesothertha
ourchoiceforthekeyattributesThekeyforLeaguesisitsow
amethise
titysetis
otweakThekeyforTeamsisitsow
ameplusthe
ameoftheleagueofwhichtheteamisapartegRa
gersMLBorRa
gersNHLThekeyforPlayersco
sistsoftheplayers
umbera
dthekeyfortheteamo
whichheorsheplaysSi
cethelatterkeyisitselfapairco
sisti
gofteama
dleague
amesthekeyforplayersisthetriple
umberteamNameleagueNameegJeffGarciais549ersNFL
fDatabaseSystemsTheCompleteBookSolutio
sforChapter3
Solutio
sforSectio
31
Exercise312a
Weca
orderthethreetuplesi
a
yof36waysAlsothecolum
sca
beorderedi
a
yof36waysThusthe
umberofprese
tatio
sis6636
Solutio
sforSectio
32
Exercise321
CustomersssNo
ameaddresspho
eFlights
umberdayaircraftBooki
gsssNo
umberdayrowseatBei
gaweakr