欢迎来到天天文库
浏览记录
ID:39858554
大小:560.01 KB
页数:45页
时间:2019-07-13
《数据库系统基础教程答案ch4》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、数据库系统基础教程答案ch44.1.14.1.2a)b)c)Incweassumethataphoneandaddresscanonlybelongtoasinglecustomer(1-mrelationshiprepresentedbyarrowintocustomer).d)Indweassumethatanaddresscanonlybelongtoonecustomerandaphonecanexistatonlyoneaddress.Ifthemultiplicityofaboverelations
2、hipswerem-to-n,theentitysetbecomesweakandthekeyssNoofcustomerswillbeneededaspartofthecompositekeyoftheentityset.Inc&d,weconvertattributesphonesandaddressestoentitysets.Sinceentitysetsoftenbecomerelationsinrelationaldesign,wemustconsidermoreefficientalternati
3、ves.Insteadofqueryingmultipletableswherekeyvaluesareduplicated,wecanalsomodifyattributes:(i)PhonesattributecanbeconvertedintoHomePhone,OfficePhoneandCellPhone.(ii)Amultivaluedattributesuchasaliascanbekeptasanattributewhereasinglecolumncanbeusedinrelationalde
4、signi.e.concatenateallvalues.SQLallowsaquery"like'%Junius%'"tosearchthemultiplevaluesinacolumnalias.4.1.34.1.4a)b)c)Therelationship"played"betweenTeamsandPlayersissimilartorelationship"plays"betweenTeamsandPlayers.4.1.54.1.6Theinformationaboutchildrencanbeas
5、certainedfrommotherOfandfatherOfrelationships.AttributessNoisrequiredsincenamesarenotunique.4.1.74.1.8a)(b)4.1.9AssumptionsAProfessoronlyworksinatmostonedepartment.AcoursehasatmostoneTA.Acourseisonlytaughtbyoneprofessorandofferedbyonedepartment.Studentsandpr
6、ofessorshavebeenassigneduniqueemailids.Acourseisuniquelyidentifiedbythecourseno,sectionno,andsemester(e.g.cs157-3spring09).4.1.10Giventhatforeachmovie,auniquestudioexiststhatproducesthemovie.Eachstariscontractedtoatmostonestudio.Butstarscouldbeunemployedatag
7、iventime.Thusthefour-wayrelationshipinfig4.6canbeeasilyintoconvertedequivalentrelationships.4.2.1Redundancy:TheowneraddressisrepeatedinAccSetsandAddressesentitysets.Simplicity:AccSetsdoesnotserveanyusefulpurposeandthedesigncanbemoresimplyrepresentedbycreatin
8、gmany-to-manyrelationshipbetweenCustomersandAccounts.Rightkindofelement:TheentitysetAddresseshasasingleattributeaddress.Acustomercannothavemorethanoneaddress.Henceaddressshouldbeanattributeofent
此文档下载收益归作者所有