版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、ConsiderthefollowinginformationinanairportdatabaseAnairportisdescribedbyitsnameandthecitythattheairportIocatesatEachairpIanehasanuniqueregistrationnumberandaIsothedateofproductionasitsdescriptiveattributesEachairplanemodeIisidentifiedbyamodeInumberandhasacapacityandaweightAtechnicianischaracterizedb
2、yanuniquetechnician_id,hisnameandhisphonenumberEachairportaccommodatesanumberofairpIanemodeIs,andanairpIanemodeImayappearsinseveraIairports;butsomeairportsarenotsuitabIeforaccommodaingseveraIspecialpIanemodeIs.EachairpIaneisofaspecificmodeI,e.g.Boeing737;andforeachmodeI,therearemorethanoneairplanebe
3、ingofit.foreachairport,therearesometechniciansworkingthere,andeachtechnicianmustworksatonlyoneairport.EachtechnicianisresporisibleforoneormorepIanemodeIs,andeachplanemodelhasatleastonetechnicianresponsibleforitEachairpIaneisperiodicallytestedbyanumberoftechnicianstoensurethattheairplaneisstillairwor
4、thy.AtechnicianmaytestseveraIairplaneseachyear,andsometimesatechnicianhasnotaskfortestingtheairplanes?ItisrequiredthatwhenatechniciantestsanairpIane,theairplanemodeIthatheisresponsibleforisjustthemodeIthattheairpIanetestedisof.Theinformation,suchasthetestnumber,thetestingdate,thetestingresultandthet
5、imespentonthetest,isneededtodescribeatestingoftheairplane(1) DesigntheE/RdiagramfortheairportdatabaseonthebasisoftheinformationmentionedaboveNote:theprimarykeyoftheentities,mappingcardinalityofeachrelationshipandparticipationofeachentitytotherelationshipshouldbedescribedinthediagram.(10points)(2) Co
6、nverttheE-Rdiagramtotheproperrelationalschema,andgivetheprimarykeyofeachrelationschemabyunderlines.(10points)Answers:ui-namey(weight):*<TQcapacily)< m-num J)airport<5acc o m inodatemodelwork<ponsib>be-of J> technician(t-nuin)JZ;、一testaiiplane(bnamc)CresulDCtimejdate)X (re-nun】)(pho
7、nejiuni)-dale)(10points)实体airport归结为:airport(a-name,city);实体model归结为:model(m-num,weight,capacity);联系accommodate归结为:accominodate(a-name,nvnum);实体airplane和联系be?of归结为:airplane(re-num,date,m-num);实体technician>联系work归结为:technician(上t-name,phone-num,a-name)联系test归结为:test(t-id,re-num,t-num,t-date,time,r
8、esult)联系responsible归结为:responsible(Md,nvnum)二、Auniversitystudentdatabaseneedstostoreinformationaboutstudents八professors八projects八anddepartments.Considerthefollowinginformation:?EachstudenthasaSNo,aname,anage,andadegreeprogram(e.g.M.S.orPh.D.).?EachprofessorhasaPNo,aname,anage,andaresearchspecialty.?
9、Eachprojecthasaprojectnumber,astartingdate,anendingdate,andabudget.?Eachdepartmenthasadepartmentnumber,adepartmentname,andamainoffice.?integrityconstraints:a. Astudentstudiesinone(andonlyone)departmentb. AProfessorworksinone(andonlyone)departmentc?Eachprojectmustbemanagedbyoneandonlyoneprofessor,and
10、eachprofessormustmanageatleastoneproject.d. Eachprojectisworkedonbysomestudents,morethanonestudentcanparticipate(orworkon)thesameproject,andsomestudentsmayworkonnoprojects.e. Whenastudentworkonaproject,theprofessormanagingthisprojectmustsupervisethestudentswork.Onestudentmayworkonseveralprojects,soh
11、emayhaveseveralsupervisors?(1) DesignanddrawanE/Rdiagramforthisdatabasethatcapturestheinformationabove?Note:mappingcardinalityofeachrelationshipandparticipationofeachentitytotherelationshipshouldbedescribedinthediagram.(2) ConverttheE-Rdiagramtotheproperrelationalschema,andgivetheprimarykeyofeachrel
12、ationschemabyunderlines?Answers:E-RdiagramisasfollowsUKiinej/degree,、Vperanz"departtnehrx<-numberJ(SNo/studentsludy>idepartinent/main、V_-office_x<garticipat><&jpcrvisoj>><Lworks(budget)projectsjnanaee7/project-number/'、fndin宜、X.J-dtUc)AtarimgV-dateJ:professor<
13、name><rescarch;><areasJ(2) thereducedtablesareasfollows:department-number)(a) student(SNo,name,age,degree-program,Note:relationshipstudyisreducedtothistable(b) professor(PNo,name,age,research-area,department-number)Note:relationshipworksisreducedtothistable(c)department(departdepart-name
14、,main-officer)(d) project(project?number,starting-date,ending-date,budget,PNo)Note:relationshipmanageisreducedtothistable(e) participate(SNo,project-number)supervisor(SNo,PNo)solution2:(1) E-RdiagramisasfollowsstudentparticipatedJbudset;epartmen?name1studyupervisoi/departments<-numberJtdepartment
15、sX*13O-tmain-officeworks、PMprojectCBS)I k J-vendingJ-datU_一一_一hstartinej,-cate"dprofessoriresearc;1areas(2) thereducedtablesareasfollows:(a) student(SNo,name,age,degree-program,department-niunber)Note:relationshipstudyisreducedtothistable(b) professor(PNo,name,age,research-area,department-numbe
16、rNote:relationshipworksisreducedtothistable(c)department(department-number,depart-name,main-officer)(d) project(project-number,starting-date,ending-date,budget,PNo)Note:relationshipmanageisreducedtothistable(e) participate(SNo,project-number)(f) supervisor(SNo,PioiecJnumber,PNo)三.NotovvnRecordscompa
17、nyneedstostoreinformationaboutsongs,albums(专辑)andmusicianswhoperformonitsalbumsinadatabase.Considerthefollowinginformation:?EachmusiciansthatrecordsatcompanyhasanId(whichisunique),aname,anaddress,andaphonenumber.?EachinstrumentusedincompanyhasanameandanuniqueID.?EachalbumrecordedontheNotownlabelhasa
18、title,acopyrightdate,aformat,andanalbumidentifier.?EachsongrecordedatNotownhasatitleandanauthor,andeachsongcanbeidentifiedbyitstitle.?Anmusicianmayplayseveralinstruments,andaninstrumentsmaybeplayedbyseveralmusicians?Eachalbumhasanumberofsongsonit,andeachsongbelongstoonlyonealbum.?Eachsongisperformed
19、byoneormoremusicians,andamusicianmayperformanumberofsongs?Eachalbumhasexactlyonemusicianwhoactsasitsproducer.Amusicianmayproduceseveralalbums,butsomemusiciansmayhavenoalbums.(1) DesigntheE/Rdiagramforhospitaldatabaseonbasisoftheinformationmentionedabove.(10points)Note:mappingcardinalityofeachrelatio
20、nshipandparticipationofeachentitytotherelationshipshouldbedescribedinthediagram.(2) ConverttheE-Rdiagramtotheproperrelationalschemas,andgivetheprimarykeysofeachrelationschemasbyunderlines.(10points)四、Ahospitaldatabaseneedstostoreinformationaboutdoctors,patients,sickroom(病房),anddepartments(科室).Consid
21、erthefollowinginformation?Eachdoctorhasdescriptiveattributesofidentifiernumber,name,age,andtechnicaltitle).?Eachpatienthasdescriptiveattributesofthenumberofmedicalrecords(病历),name,age,andsex?Eachsickroomhasdescriptiveattributesofthenumberofsickroom,theaddress?Eachdepartmenthasdescriptiveattributesof
22、name,address,telephone-number?Integrityconstraints:a. Eachdoctormustbelongtoone(andonlyone)department;andforeachdepartment,therearemorethanonedoctorsbelongingtoit.b. Eachpatientistakencareofbyoneandonlyoneresponsibledoctor;adoctormayberesponsiblefornopatients,oronlyonepatients,ormorethanonepatientsc
23、. Eachpatientlivesinoneandonlyonesickroom;asickroommaycontainmorethanonepatientsd?Eachsickroomcanbemanagedbymorethanonedepartment;butforsomedepartments,therearenosickroomsmanagedbythem,whileforotherdepartments,therearemorethanonemanagedsickroom?(1) DesigntheE/Rdiagramforhospitaldatabaseonbasisofthei
24、nformationmentionedabove?(10points)Note:mappingcardinalityofeachrelationshipandparticipationofeachentitytotherelationshipshouldbedescribedinthediagram?(2) ConverttheE-Rdiagramtotheproperrelationalschema,andgivetheprimarykeyofeachrelationschemabyunderlines.(10points)五.(20points)Apharmaciesdatabasenee
25、dstostoretheinformationaboutthepharmaceuticalcompanies(帝l药公司)andothers.Therelevantinformationisasfollows:?Eachpharmaceuticalcompanyisidentifiedbyitsnameandhasaphonenumber.?Eachpharmacy(药房)isidentifiedbyitsnameandhasanaddress,andseveralphonenumbers?Foreachdrug?thetradenameandformulamustberecorded,and
26、thetradenameidentifiesadruguniquely.?Eachdrugisdevelopedbyonlyonegivenpharmaceuticalcompany,andonepharmaceuticalcompanycandevelopseveraldrugsandperhapsdevelopsnodugnow.?Eachpharmacysellsseveraldnjgsandhasapriceforeach?Adrugcouldbesoldbyseveralpharmacies,andthepricemayvaryfromonepharmacytoanother.?Ph
27、armaceuticalcompaniesmakecontractswithpharmacies,butsomepharmaceuticalcompaniesmayhavenocontract.Apharmaceuticalcompanycansigncontractswithseveralpharmacies,andapharmacycanalsoenterintocontractswithseveralpharmaceuticalcompanies.Eachcontractisdescribedbyastartdate,anenddateandthecontentofthecontract
28、?(1) DesigntheE/Rdiagramforhospitaldatabaseonbasisoftheinformationmentionedabove?(10points)Note:themappingcardinalityofeachrelationshipandparticipationofeachentitytotherelationshipshouldbedescribedinthediagram.(2) ConverttheE-Rdiagramtotheproperrelationalschemas,andgivetheprimarykeyofeachrelationschemabyunderlines?(10points)六、(8Points)Aschoolisgoingtoarrangeasportsdayforthestudents.Adatabasetokeeptrackofparticipantsandactivitiesduringthesportsdayistobecreated.
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年标准情侣分手合同范例一
- 2024版仓储设施租赁合同示范文本6篇
- 2024年度发电设备租赁合同范本9篇
- 2024年度林业环保工程树木栽种与绿色生活合同3篇
- 2024年环保技术研发及转让合同
- 2024版二手房抵押交易安全保障协议3篇
- 2024年度咨询服务合同专家团队提供成果验收3篇
- 大型商场买卖合同范例
- 东莞农村土地转让合同范例
- 社团活动计划范文合集十篇
- 草原牧歌-金杯 课件 2024-2025学年人音版(简谱)(2024)初中音乐七年级上册
- 新疆乌鲁木齐地区2023届高三第一次质量监测化学试题(解析版)
- 2024年新人教版三年级数学上册《第8单元第8课时 分数的初步认识复习》教学课件
- 北京市东城区2023-2024学年高一年级上册期末历史试题
- 上海市市辖区(2024年-2025年小学四年级语文)部编版期末考试(上学期)试卷及答案
- 2025届高考语文复习:文言文翻译 课件
- 部编人教版二年级上《道德与法治》全册教案
- 新《斜视弱视学》期末考试复习题库(含答案)
- 2024年征信考试题库(含答案)
- 拳馆团队合作协议书范本
- 13.2 在奉献中成就精彩人生 课件-2024-2025学年统编版道德与法治七年级上册
评论
0/150
提交评论