2023年数据库系统基础教程第四章超详细解析超详细解析答案.pdf
《2023年数据库系统基础教程第四章超详细解析超详细解析答案.pdf》由会员分享,可在线阅读,更多相关《2023年数据库系统基础教程第四章超详细解析超详细解析答案.pdf(35页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、数据库系统基础教程第四章答案 Solutions Chapter 4 4、1、1 4、1、2 a)b)c)In c we assume that a phone and address can only belong to a single customer(1-m relationship represented by arrow into customer)、数据库系统基础教程第四章答案 d)In d we assume that an address can only belong to one customer and a phone can exist at only one add
2、ress、If the multiplicity of above relationships were m-to-n,the entity set becomes weak and the key ssNo of customers will be needed as part of the composite key of the entity set、In c&d,we convert attributes phones and addresses to entity sets、Since entity sets often become relations in relational
3、design,we must consider more efficient alternatives、Instead of querying multiple tables where key values are duplicated,we can also modify attributes:(i)Phones attribute can be converted into HomePhone,OfficePhone and CellPhone、(ii)A multivalued attribute such as alias can be kept as an attribute wh
4、ere a single column can be used in relational design i、e、concatenate all values、SQL allows a query like%Junius%to search the multiple values in a column alias、据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据
5、库系统基础教程第四章答案数据库系统基础教程第四章答案 4、1、3 4、1、4 a)据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 b)c)The relationship played between Teams and Players is similar to relationship plays betw
6、een Teams and Players、4、1、5 据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 4、1、6 The information about children can be ascertained from motherOf and fatherOf relationships、Attribu
7、te ssNo is required since names are not unique、4、1、7 据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 4、1、8 a)(b)据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基
8、础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 4、1、9 Assumptions A Professor only works in at most one department、A course has at most one TA、A course is only taught by one professor and offered by one department、Students and professors have been
9、assigned unique email ids、A course is uniquely identified by the course no,section no,and semester(e、g、cs157-3 spring 09)、4、1、10 Given that for each movie,a unique studio exists that produces the movie、Each star is contracted to at most one studio、据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系
10、统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 But stars could be unemployed at a given time、Thus the four-way relationship in fig 4、6 can be easily into converted equivalent relationships、4、2、1 Redundancy:The owner address is repe
11、ated in AccSets and Addresses entity sets、Simplicity:AccSets does not serve any useful purpose and the design can be more simply represented by creating many-to-many relationship between Customers and Accounts、Right kind of element:The entity set Addresses has a single attribute address、A customer c
12、annot have more than one address、Hence address should be an attribute of entity set Customers、据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 Faithfulness:Customers cannot be uniqu
13、ely identified by their names、In real world Customers would have a unique attribute such as ssNo or customerNo 4、2、2 Studios and Presidents can be combined into one entity set Studios with Presidents becoming an attribute of Studios under following circumstances:1、The Presidents entity set only cont
14、ains a simple attribute viz、presidentName、Additional attributes specific to Presidents might justify making Presidents into an entity set、4、2、3 4、2、4 The entity sets should have single attribute、a)Stars:starName b)Movies:movieName c)Studios:studioName、However there exists a many-to-many relationship
15、 between Studios and Contracts、Hence,in addition,we need more information about studios involved、If a contract always involves two studios,two attributes such as producingStudio and starStudio can replace the Studios entity set、If a contact can be associated with at most five studios,it may be possi
16、ble to replace the Studios entity set by five attributes viz、studio1,studio2,studio3,studio4,and studio5、Alternately,a composite attribute containing concatenation of all studio names in a contact can be considered、A separator character such as$can be used、SQL allows searching of such an attribute u
17、sing query like%keyword%4、2、5 From Augmentation rule of Functional Dependency,given B-M (B=Baby,M=Mother)then BND-M(N=Nurse,D=Doctor)Hence we can just put an arrow entering mother、a)Put an arrow entering entity set Mothers for the simplest solution(As in fig、4、4,where a multi-way relationship was al
18、lowed,even though Movies alone could identify the Studio)、However,we can display more accurate information with below figure、据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 b)c)Aga
19、in from Augmentation rule of Functional Dependency,given BM-D then BMN-D 据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 Thus we can just add an arrow entering Doctors to fig 4、15、
20、Below figure represents more accurate information however、4、2、6 a)b)Transitivity and Augmentation rules of Functional Dependency allow arrow entering Mothers from Births、However,a new relationship in below figure represents more accurate information、据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程
21、第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 c)Design flaws in abc above 1、As suggested above,using Transitivity and Augmentation rules of Functional Dependency,much simpler design is possible、4、2、7 In below figure there exists
22、 a many-to-one relationship between Babies and Births and another many-to-one relationship between Births and Mothers、From transitivity of relationships,there is a many-to-one relationship between Babies and Mothers、Hence a baby has a unique mother while a birth can allow more than one baby、据库系统基础教程
23、第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 4、3、1 a)b)A captain cannot exist without a team、However a player can(free agent)、A recently formed(or defunct)team can exist without players
24、 or colors、c)Children can exist without mother and father(unknown)、据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案数据库系统基础教程第四章答案 4、3、2 a)The keys of both E1 and E2 are required for uniquely iden
25、tifying tuples in R b)The key of E1 c)The key of E2 d)The key of either E1 or E2 4、3、3 Special Case:All entity sets have arrows going into them i、e、all relationships are 1-to-1 Any Ki Otherwise:Combination of all Kis where there does not exist an arrow going from R to Ei、4、4、1 No,grade is not part o
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2023 数据库 系统 基础教程 第四 详细 解析 答案
限制150内