资源描述:
《数据库系统基础教程第二章答案解析》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、专业技术资料分享Exercise2.2.1aForrelationAccounts,theattributesare:acctNo,type,balanceForrelationCustomers,theattributesare:firstName,lastName,idNo,accountExercise2.2.1bForrelationAccounts,thetuplesare:(12345,savings,12000),(23456,checking,1000),(34567,savings,25)ForrelationCustomers,thetupl
2、esare:(Robbie,Banks,901-222,12345),(Lena,Hand,805-333,12345),(Lena,Hand,805-333,23456)Exercise2.2.1cForrelationAccountsandthefirsttuple,thecomponentsare:123456àacctNosavingsàtype12000àbalanceForrelationCustomersandthefirsttuple,thecomponentsare:RobbieàfirstNameBanksàlastName901-222ài
3、dNo12345àaccountExercise2.2.1dForrelationAccounts,arelationschemais:Accounts(acctNo,type,balance)ForrelationCustomers,arelationschemais:Customers(firstName,lastName,idNo,account)Exercise2.2.1eAnexampledatabaseschemais:Accounts(acctNo,type,balance)Customers(firstName,lastName,idNo,acc
4、ount)Exercise2.2.1fAsuitabledomainforeachattribute:acctNoàIntegertypeàStringbalanceàIntegerfirstNameàStringlastNameàStringWORD资料可编辑专业技术资料分享idNoàString(becausethereisahyphenwecannotuseInteger)accountàIntegerExercise2.2.1gAnotherequivalentwaytopresenttheAccountrelation:acctNobalancetyp
5、e3456725savings234561000checking1234512000savingsAnotherequivalentwaytopresenttheCustomersrelation:idNofirstNamelastNameaccount805-333LenaHand23456805-333LenaHand12345901-222RobbieBanks12345Exercise2.2.2Examplesofattributesthatarecreatedforprimarilyservingaskeysinarelation:UniversalP
6、roductCode(UPC)usedwidelyinUnitedStatesandCanadatotrackproductsinstores.SerialNumbersonawidevarietyofproductstoallowthemanufacturertoindividuallytrackeachproduct.VehicleIdentificationNumbers(VIN),auniqueserialnumberusedbytheautomotiveindustrytoidentifyvehicles.Exercise2.2.3aWecanorde
7、rthethreetuplesinanyof3!=6ways.Also,thecolumnscanbeorderedinanyof3!=6ways.Thus,thenumberofpresentationsis6*6=36.Exercise2.2.3bWecanorderthethreetuplesinanyof5!=120ways.Also,thecolumnscanbeorderedinanyof4!=24ways.Thus,thenumberofpresentationsis120*24=2880Exercise2.2.3cWecanorderthethr
8、eetuplesinan