資源描述:
《ER建模及關(guān)系表轉(zhuǎn)換習題2010.doc》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、一、ConsiderthefollowinginformationinanairportdatabaselAnairportisdescribedbyitsnameandthecitythattheairportlocatesatlEachairplanehasaregistrationnumberandthedateofproductionasitsdescriptiveattributeslEachairplanemodelisidentifiedbyamodelnumberandhasacapacityandaweightlAtechnicianischaracterizedby
2、technician_id,hisnameandhisphonenumberlEachairportaccommodatesanumberofairplanemodels,andanairplanemodelmayappearsinseveralairportslEachairplaneisofaspecificmodel,e.g.Boeing737;andforeachmodel,theremaybemorethanoneairplanebeingofitlAnumberoftechniciansworkattheairport,buteachtechnicianworksatonl
3、yoneairport.lEachtechnicianisresponsibleforoneormoreplanemodels,andoneplanemodelhasoneormoretechniciansresponsibleforitlEachairplaneisperiodicallytestedbyanumberoftechnicianstoensurethattheairplaneisstillairworthy.Atechnicianmaytestseveralairplaneseachyear.Itisrequiredthatwhenatechniciantestsana
4、irplane,theairplanemodelthatheisresponsibleforisjustthemodelthattheairplanetestedisof.Theinformation,suchastestnumber,thetestingdate,thetestingresultandthetimespentonthetest,isneededtodescribeatestingoftheairplane(1)DesigntheE/Rdiagramfortheairportdatabaseonthebasisoftheinformationmentionedabove
5、Note:thekeyoftheentities,mappingcardinalityofeachrelationshipandparticipationofeachentitytotherelationshipshouldbedescribedinthediagram..(10points)(2)ConverttheE-Rdiagramtotheproperrelationalschema,andgivetheprimarykeyofeachrelationschemabyunderlines.(10points)Answers:或:(2)(10points)實體airport歸結(jié)為
6、:airport(a-name,city);實體model歸結(jié)為:model(m-num,weight,capacity);聯(lián)系accommodate歸結(jié)為:accommodate(a-name,m-num);實體airplane和聯(lián)系be-of歸結(jié)為:airplane(re-num,date,m-num);實體technician、聯(lián)系work、聯(lián)系test歸結(jié)為:technician(t-id,t-name,phone-num,a-name)test(t-id,re-num,t-num,t-date,time,result)聯(lián)系responsible歸結(jié)為responsible(t
7、-id,m-num)如果technician部分參與到聯(lián)系test中,則如下圖所示:關(guān)系表轉(zhuǎn)換:實體airport歸結(jié)為:airport(a-name,city);實體model歸結(jié)為:model(m-num,weight,capacity);聯(lián)系accommodate歸結(jié)為:accommodate(a-name,m-num);實體airplane和聯(lián)系be-of歸結(jié)為:airplane(re-num,date,m-num);實體technic