付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
华南农业大学期末考试试卷(A卷)d2006学年第一学期考试科目:数据库原理与方法考试类型:(闭卷)考试时间:120分钟参考答案:Question1:Adatabase-managementsystem(DBMS)isacollectionofinterrelateddataandasetofprogramstoaccessthosedata.Metadataisdataaboutdata.TheE-Rdatamodelisawidelyuseddatamodelfordatabasedesign.Itprovidesaconvenientgrapicalrepresentationtoviewdata,relationships,andconstraints.Asuperkeyofanentitysetisasetofoneormoreattributesthat,takencollectivly,allowsustoidentifyuniquelyanentityintheentityset.Suchminnimalsuperkeysarecalledcandidatekeys.Adata-manipulationlanguage(DML)isalanguagethanenablesuserstoaccessormanipulatedata.Adata-definitionlanguage(DDL)isalanguageforspecifyingthedatabaseschemaandaswellasotherpropertiesofthedata.TransactionsarerequiredtohavetheACIDproperties:atomicity,consistency,isolation,anddurability.Atomicityensuresthateitheralltheeffectsoftransactionarereflectedinthedatabase,ornoneare;Consistencyensuresthat,ifthedatabaseisinitiallyconsistent,theexecutionofthetransactionleavesthedatabaseinaconsistentstate.Isolationensuresthatconcurrentlyexecutingtransactionsareisolatedfromonanother.Durablityensuresthat,onceatransactionhasbeencommitted,thattransaction’sudpatesdonotgetlost,evenifthereisasystemfailure.Itisastatewhereneitherofthesetransactionscaneverproceedwithitsnormalexecution.Concurrencyscheduleconsistsofasequenceofinstructionsfromvarioustransactionswhichrunconcurrently.Auniquefixedtimestampisassociatedwitheachtransactioninthesystem.Thetimestampofthetransactiondeterminetheserializabilityorder.Themostwidelyusedstructureforrecordingdatabasemodificationsisthelog.Thelogisasequenceoflogrecords,recordingalltheupdateactivitiesinthedatabase.Question2:a.b:Relationschemas:factory(name,director,location)workshop(wid,director,location,telephone)depositor(did,director,telephone)accessory(aid,weight,price)product(pid,price)worker(worker_id,name,start_date)f_w(name,wid,number)--FKnamereferencefactory--FKwidreferenceworkshopf_d(name,did,number) --FKnamereferencefactory--FKdidreferencedepositorw_a(wid,aid,number)--FKwidreferenceworkshop--FKaidreferenceaccessoryw_p(wid,pid,number)--FKwidreferenceworkshop--FKpidreferenceproductd_a(did,aid,number)--FKdidreferencedepositor--FKaidreferenceaccessoryd_p(did,pid,number)--FKdidreferencedepositor--FKpidreferenceproducta_p(aid,pid,number)--FKaidreferenceaccessory--FKpidreferenceproductw_w(wid,worker_id,number)--FKwidreferenceworkshop--FKworker_idreferenceworkerQuestion3:F={(S#,C#)→G,C#→TN,TN→D}1NF∵Fm={(S#,C#)→G,C#→TN,TN→D}∴P={R1,R2,R3}ThedefinitionofR1,R2andR3is:R1=(S#,C#,G)R2=(C#,TN)R3=(TN,D)Question4:a.∏empnoδpublisher=’McGraw-Hill’(LoanBooks)b.∏name,ageδpublisher=’McGraw-Hill’(EmployeeLoanBooks)c.∏name,officeδpublisher=’McGraw-Hill’∧year>2000(EmployeeLoanBooks)d.∏empno(Loan)-∏empnoδpublisher=’McGraw-Hill’(LoanBooks)Question5:selectavg(price)frommarketm,saless,itemiwherem.mno=s.mnoands.ino=i.inoandm.city=’Guangzhou’andi.ino=’abc2164’andcolor=‘redselectmnofromsaleswhereino=’pc100intersectselectmnofromsaleswhereino=’jk375selectino,iname,colorfromitemwhereinoin(selectinofromsaleswheremno=’rs225’exceptselectinofromsaleswheremno=’az507’)selectino,max(price),min(price)fromsalsegroupbyinohavingmax(price)-min(price)>100Question6:(select*fromr1)union(select*fromr2)(select*fromr1)intersect(select*fromr2)(select*fromr1)except(select*fromr2)selectr1.A,r2.B,r1.Cfromr1,r2wherer1.B=r2.BQuestion7:a.undo-l
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年村级水管员安全防护知识培训
- 疯狂的土地课件
- 2026年导游讲解服务与应急处理竞赛题
- 2026年驾驶证三力测试高频考点练习题集
- Nike服装设计理念与发展趋势
- 门店中秋活动策划方案
- 2026年个人品牌建设与推广策略解析
- 2026年春耕生产农机检修保养技术知识试题
- 护理护理职业发展与继续教育
- 礼仪规范教程课件
- 铁路工务段防洪安全培训课件
- 2026年春期部编人教版四年级下册语文 第七单元 核心素养教案(反思有内容)二次备课版
- 2026广西投资集团校招面笔试题及答案
- 医疗器械经营企业质量管理体系文件(2025版)(全套)
- 摩托艇租赁合同范本
- JJG1036-2022天平检定规程
- 抗体效价与免疫记忆持久性关联-洞察及研究
- 2025小学五年级英语语法专项训练题
- 2026年中考数学压轴题专项练习-垂美四边形模型(学生版+详解版)
- 虚拟仿真煤矿安全培训课件
- GB/T 46075.1-2025电子束焊机验收检验第1部分:原则与验收条件
评论
0/150
提交评论