资源描述:
《数据库系统基础教程第三章答案..doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、……………………………………………………………最新资料推荐…………………………………………………Exercise3.1.1Answersforthisexercise mayvarybecauseofdifferentinterpretations.Somepossible FDs:ﻩSocial Security numberà nameﻩArea codeà stateﻩStreetaddress,city,stateà zipcodePossible keys:{SocialSecuritynumber,
2、streetaddress,city,state, areacode,phone number}Needstreetaddress, city,state touniquely determinelocation.Apersoncould havemultipleaddresses。Thesame is trueforphones.These days,aperson couldhavea landlineanda cellularphoneExercise3.1。2Answersforthisexercise
3、mayvarybecauseof differentinterpretationsSomepossible FDs:IDàx—position,y—position,z-positionﻩIDàx-velocity,y-velocity, z—velocityx—position,y-position, z—positionàIDPossiblekeys:{ID}ﻩ{x—position, y—position, z—position}Thereasonwhy thepositionswouldbe akey
4、is notwomoleculescanoccupythesamepoint。Exercise 3.1.3aThesuperkeysareany subsetthatcontainsA1. Thus,there are2(n-1)such subsets, sinceeachofthen-1 attributesA2throughAnmay independentlybechosenin or out.Exercise3。1.3bThesuperkeys are anysubset thatcontains A
5、1orA2。 Thereare2(n-1) suchsubsetswhen consideringA1andthen-1 attributesA2throughAn. Thereare2(n-2) suchsubsetswhenconsidering A2 andthen-2attributesA3 throughAn。Wedo notcountA1inthesesubsetsbecausetheyarealready33/33……………………………………………………………最新资料推荐…………………………………
6、………………countedinthe firstgroupofsubsets.Thetotal numberofsubsetsis2(n—1)+ 2(n-2).Exercise3。1.3cThesuperkeys areany subsetthatcontains {A1,A2} or{A3,A4}.There are2(n-2)suchsubsets whenconsidering{A1,A2}andthen-2 attributesA3throughAn.Thereare2(n—2)– 2(n-4)such
7、subsetswhen considering{A3,A4} and attributesA5throughAnalongwiththeindividualattributes A1andA2。Wegetthe2(n-4)termbecausewehavetodiscardthesubsetsthatcontainthekey{A1,A2}toavoiddoublecounting。Thetotal number ofsubsets is2(n-2) +2(n—2)–2(n—4).Exercise3.1.3dT
8、hesuperkeys are anysubsetthat contains{A1,A2}or{A1,A3}.There are2(n-2)such subsets whenconsidering{A1,A2}andthen-2attributesA3throughAn。Thereare2(n-3)suchsubsets whenconsidering{A1,A3}and then-3