數(shù)據(jù)庫考試題及答案_第1頁
數(shù)據(jù)庫考試題及答案_第2頁
數(shù)據(jù)庫考試題及答案_第3頁
數(shù)據(jù)庫考試題及答案_第4頁
數(shù)據(jù)庫考試題及答案_第5頁
已閱讀5頁,還剩64頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

經(jīng)典word整理文檔,僅參考,雙擊此處可刪除頁眉頁腳。本資料屬于網(wǎng)絡(luò)整理,如有侵權(quán),請(qǐng)聯(lián)系刪除,謝謝!!!!數(shù)據(jù)庫考試題及答案1.Theremaybeinstanceswhereanattributehasasetofvaluesforaspecificentity.Thistypeofattributeissaidtobe【】D.compositeattribute2.Inaparticularbank,aloancanbelongtoonlyonecustomer,andacustomercanhaveseveralloans,thentherelationshipsetfromcustomertoloanis【】A.tableB.view.datadictionaryD.trigger6.IfascheduleScanbetransformedintoascheduleS’byaseriesofswapsofnon-conflictinginstructions,wesaythatSandS’are【】B.conflictequivalent.conflictserializable3、DBMS:Adatabasemanagementsystemconsistsofacollectionofinterrelateddataandacollectionofprogramstoaccessthosedata.4、Datadictionary:Adatadictionaryisafilethatcontainsmetadata,thatisdataaboutdata.5、Transaction:Thetransactionisaunitofprogramexecutionthataccessesandpossiblyupdatesvariousdataitems.[10分]E-R圖:SupeStu(1)正確描述出Teacher、Course、Teach、Supervise、Student五個(gè)實(shí)體集及聯(lián)系集及其相關(guān)屬性—5分Student(sno,sname,age,bno,tno,score)主鍵:sno外鍵:tno1.createtableCourse(cnochar(4),cnamechar(10),markinteger,primarykey(tno))–1分scoreinteger,check(age>0))-1分cnochar(4),primarykey(tno,cno),foreignkey(tno)referencesTeacher(tno),foreignkey(cno)referencesCourse(cno))–1分–2分where計(jì)算機(jī)’orderbytnodesc--1.5分orderby語句正確占0.5分5.selectdistinctsnamefromStudentBC,AD,BE都是候選碼,--4分[12分]+1.S為沖突可串行化調(diào)度。---4分2.沖突等價(jià)的串行調(diào)度為<T2,T3,T1>--8分十二、[12分]用英文解釋:、A.不可能多于一個(gè)B.不可以作為其他關(guān)系的外部鍵C.可以取空值D.不可以是屬性組合B.數(shù)據(jù)冗余3.由于出錯(cuò)而全不發(fā)生這是事務(wù)的()性質(zhì).4.()是數(shù)據(jù)抽象的最低層次,描述數(shù)據(jù)實(shí)際上是怎樣存B.邏輯層6.A中的一個(gè)實(shí)體至多同B中的一個(gè)實(shí)體相聯(lián)系,而B中的一個(gè)實(shí)體可以同A中任意數(shù)目的實(shí)體相聯(lián)系,則A和7.()提供定義關(guān)系模式、刪除關(guān)系以及修改關(guān)系模式的9.計(jì)算過程中不忽略NullB.max()D.count()10.假設(shè)關(guān)系person包含元組{John,Smith,Jeffrey,Mary,Valeria},關(guān)系customer包含元組{John,Jeffrey,Tom}。則person和customer的集合差運(yùn)算結(jié)果應(yīng)該包含()個(gè)元組。A.3B.2C.1D.5三、[8分]每個(gè)運(yùn)動(dòng)員保存?zhèn)€人記錄,包括:姓名、性別、年齡、身份證號(hào)。對(duì)每項(xiàng)比賽存有:比賽編號(hào)、比賽時(shí)間、地點(diǎn)、比分、參加比賽的球隊(duì)名稱。還應(yīng)記錄上場(chǎng)隊(duì)員在每場(chǎng)比E-R四、[8分]根據(jù)下面的E-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出相應(yīng)的主鍵和外鍵。account-numberbalancebranch-namebranch-cityassets五、[12分]考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-name,street,city)works(employee-name,company-name,)company(company-name,)a.找出不為FirstBankCorporation工作的所有員工的名字c六、[10分]關(guān)于關(guān)系模式R=(A,B,C,D,E)的函數(shù)依賴集F如下所示,DA七、[10分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={,CD,D,A。1212八、[10分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={BC,CDE,D,D}滿足3NF分解的關(guān)系模式。九、[10分]考慮如下所示的優(yōu)先圖,相應(yīng)的調(diào)度是沖突可十四、[12分]用英文解釋:10、:Atransactionisaunitofprogramexecutionthataccessesandpossiblyupdatesvariousdataitems.11、DBMSAdatabasemanagementsystemconsistsofacollectionofinterrelateddataandacollectionofprogramstoaccessthatdata.12、Datamodel:Acollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,anddataconstraints.三、[8分]每個(gè)運(yùn)動(dòng)員保存?zhèn)€人記錄,包括:姓名、性別、年齡、身份證號(hào)。對(duì)每項(xiàng)比賽存有:比賽編號(hào)、比賽時(shí)間、地點(diǎn)、比分、參加比賽的球隊(duì)名稱。還應(yīng)記錄上場(chǎng)隊(duì)員在每場(chǎng)比E-R圖,并加以必要的說明。四、[8分]根據(jù)下面的E-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出balancebranch-cityassetsaccount(account_number,balance,branch_name)primarykey(account_number)foreignkey(branch_name)branch(branch_name,branch_city,assets)primarykey(branch_name)customer(customer_name,customer_city)primarykey(customer_name)foreignkey(customer_name)五、[12分]考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-name,street,city)works(employee-name,company-name,)company(company-name,)a.找出不為FirstBankCorporation工作的所有員工的名字fromworkscGroupbycompany-nameOrderbycompany-namedescDeletefromworks六、[10分]關(guān)于關(guān)系模式R=(A,B,C,D,E)的函數(shù)依賴集F如下所示,DAC+七、[10分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={,CD,D,A。下面是R的兩個(gè)分解1212八、[10分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={BC,CDE,D,D}滿足3NF分解的關(guān)系模式。九、[10分]考慮如下所示的優(yōu)先圖,相應(yīng)的調(diào)度是沖突可6十六、[12分]用英文解釋:13、View十七、[10分]數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在其后1.Thecollectionofinformationstoredinthedatabaseataparticularmomentiscalledan(thedatabase.)of2.A()isalanguagethatenablesuserstoaccessormanipulatedataasorganizedbytheappropriatedatamodel.3.Apersonwhohassuchcentralcontroloverthesystemiscalleda(4.Applicationprogramsaresaidtoexhibit)iftheydonotdependonthe(physicalschema,andthusneednotberewrittenifthephysicalschemachanges.5.A()isacollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,andconsistencyconstraints.6.Theoveralldesignofthedatabaseiscalledthe().7.An()isasetofthesametypethatsharethesameproperties,orattributes.8.Wechooseaminimalsuperkeyforeachentitysetfromamongitssuperkeys;theminimalsuperkeyistermed9.Anyrelationthatisnotpartofthelogicalmodel,butismadevisibletoauserasavirtualrelation,iscalleda().absenceofinformationaboutthevalueofanattribute.三、[8分]閱者保存讀者記錄,包括:讀者號(hào)、姓名、地址、性別、年齡、單位。對(duì)每本書存有:書號(hào)、書名、、出版社。同一書名的書有多本,以便被多個(gè)讀者借閱。對(duì)每本被借出的書應(yīng)記錄借出日期和應(yīng)還日期。畫出相應(yīng)的E-R圖,并加以必要的說明。四、[8分]根據(jù)下面的E-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出branch-cityassets五、[12分]考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-name,street,city)works(employee-name,company-name,)company(company-name,)a.找出所有為FirstBankCorporation工作的員工的名字b.修改數(shù)據(jù)庫,使得Jones現(xiàn)在居住在Newtown市cd為FirstBankCorporation所有員工增加的薪水。.六、[10分]設(shè)有關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={A。給出R的一個(gè)無損連接的BCNF分解。七[10分]設(shè)有關(guān)系模式(A,B,C,D,ER上的函數(shù)、依賴集F={A,A(AB)?+八、[10分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={ABC,DE,D}3NF分解的關(guān)系模式。九、[10分]如下所示的調(diào)度是沖突可串行化的嗎?如果是,TT12read(B)read(A)十八、[12分]用英文解釋:16、Viewviewsarevirtualrelationsdefinedbyaquerylanguage17、DBMSAdatabasemanagementsystemconsistsofacollectionofinterrelateddataandacollectionofprogramstoaccessthatdata.18、QueryLanguageAquerylanguageinwhichauser十九、[10分]數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在其后1.Thecollectionofinformationstoredinthedatabaseataparticularmomentiscalledan(instance)ofthedatabase.2.A(DML)isalanguagethatenablesuserstoaccessormanipulatedataasorganizedbytheappropriatedatamodel.3.Apersonwhohassuchcentralcontroloverthesystemiscalleda(DBA).4.Applicationprogramsaresaidtoexhibit(physicaldataindependence)iftheydonotdependonthephysicalschema,andthusneednotberewrittenifthephysicalschemachanges.5.A(DataModel)isacollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,andconsistencyconstraints.6.Theoveralldesignofthedatabaseiscalledthe(databaseschema).7.An(entity)isasetofthesametypethatsharethesameproperties,orattributes.8.Wechooseaminimalsuperkeyforeachentitysetfromamongitssuperkeys;theminimalsuperkeyistermedtheentityseandidatekey).9.Anyrelationthatisnotpartofthelogicalmodel,butismadevisibletoauserasavirtualrelation,iscalleda(view).10.SQLallowstheuseof(null)valuestoindicateabsenceofinformationaboutthevalueofanattribute.三、[8分]閱者保存讀者記錄,包括:讀者號(hào)、姓名、地址、性別、年齡、單位。對(duì)每本書存有:書號(hào)、書名、、出版社。對(duì)每本被借出的書應(yīng)記錄借出日期和應(yīng)還日期。畫出相應(yīng)的E-R圖,并加以必要的說明。四、[8分]根據(jù)下面的E-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出account-numberbalancebranch-namebranch-cityassetsaccount(account_number,balance,branch_name)primarykey(account_number)foreignkey(branch_name)branch(branch_name,branch_city,assets)primarykey(branch_name)customer(customer_name,customer_city)primarykey(customer_name)foreignkey(customer_name)五、[12分]考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-name,street,city)works(employee-name,company-name,)company(company-name,)a.找出所有為FirstBankCorporation工作的員工的名字selectemployee-namefromworksset’Newtown’where’Jones’cGroupbycompany-nameOrderbycompany-namedescd為FirstBankCorporation所有員工增加的薪水。.Setsalary=salary*1.1where’FirstBankCorporation’六、[10分]設(shè)有關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={A。給出R的一個(gè)無損連接的BCNF分解。R1={AB}R2={CDE}R3={AC}R4={AD}七[10分]設(shè)有關(guān)系模式(A,B,C,D,ER上的函數(shù)、依賴集F={A,A(AB)?++八、[10分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={ABC,DE,D}3NF分解的關(guān)系模式。九、[10分]如下所示的調(diào)度是沖突可串行化的嗎?如果是,TT12readread(A)read(1.是二十一、[10分]了數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在其1.An()isanobjectthatexistsintherealworldandisdistinguishablefromotherobjects.3.WesaythatascheduleSis(),ifitisconflictequivalenttoaserialschedule.4.A()isanassociationamongseveralentities.5.LetRbearelationschema.AsubsetKofRisa()ofRif,inanylegalrelationr(R),forallpairstandtof12tuplesinrsuchthatt≠t,thent[K]≠t[K].12126.Underlyingthestructureofadatabaseisthe():acollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,anddataconstraints.7.A()isalanguagethatenablesuserstoaccessormanipulatedata.8.Adatabaseschemaisspecifiedbyasetofdefinitionsthatareexpressedusinga().9.A()isaunitofprogramexecutionthataccessesandpossiblyupdatesvariousdataitems.10.The()allowsatransactiontolockanewdataitemonlyifthattransactionhasnotyetunlockedanydataitem.三、[12分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={ACDE,B,ABC}+、R是否屬于3NF?為什么?四、[12分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集ADC}。.把R分解成R=(A,C,E)和R(B,D,E),試判別此分12.求F的一個(gè)CanonicalCover正則覆蓋,規(guī)范覆蓋;.給出R的一個(gè)分解,使其滿足下列三個(gè)條件:①.分解后的每一個(gè)關(guān)系模式都屬于;②.無損連接;TTT123read(A)read(A)read(B)(B)[16分]設(shè)有實(shí)體c建筑公司e員工p建筑工程項(xiàng)目,其中:c有屬性c#公司編號(hào)、cn和;e與p之間有員工參加建筑工程項(xiàng)目的聯(lián)系,用ep表示,一名員工可以參加多項(xiàng)建筑工程項(xiàng)目,一個(gè)建筑工程項(xiàng)目可以由多名員工參加;一名員工必屬于而且只屬于一個(gè)建筑公司,一個(gè)建筑公司可以有多個(gè)員工。員工與公司間的屬于聯(lián)系用ce七、[12分]設(shè)有關(guān)系數(shù)據(jù)庫:d(d#,dn,dx,da,dt,s#)p(p#,pn,px,w#)d#dadt依次分別表示醫(yī)生的編號(hào)、姓名、p#、pn和px依次分別表示住院患者的編號(hào)、姓名和s#、sn和sl依次分別表示醫(yī)院科室的編號(hào)、名稱和地表示病房編號(hào);wa表示工作量;、求職稱為prof的醫(yī)生的姓名和年齡。、求姓名為wang的醫(yī)生治療的患者的編號(hào)和姓名。、求治療w2號(hào)病房的所有患者的男(用m表示)醫(yī)生的編號(hào)。、、求屬于S3號(hào)即為科室編號(hào)科室的女醫(yī)生(用f表示)的編號(hào)和姓名。、求年齡比S5號(hào)科室編號(hào)的所有醫(yī)生的年齡都大的醫(yī)生的姓名和年齡。、九、[6分]SQL定義,此view的名稱為。應(yīng)用:求每個(gè)科室的編號(hào)和此科室的醫(yī)生的平均年齡。22、QueryLanguageAquerylanguageinwhichauserrequestsinformationfromthedatabase.23、Firstnormalform(1NF)ArelationschemaRisinfirstnormalformifthedomainofallattributesofRareatomic.24、Viewarevirtualrelationsdefinedbyaquery二十三、[10分]了數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在其1.An(entity)isanobjectthatexistsintherealworldandisdistinguishablefromotherobjects.2.Theoveralldesignofthedatabaseiscalledthe(databaseschema).3.WesaythatascheduleSis(conflictserializable),ifitisconflictequivalenttoaserialschedule.4.A(relation)isanassociationamongseveralentities.5.LetRbearelationschema.AsubsetKofRisa(superkey)ofRif,inanylegalrelationr(R),forallpairstandtoftuplesinrsuchthatt≠t,thent[K]≠12121t[K].26.Underlyingthestructureofadatabaseisthe(Datamodel):acollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,anddataconstraints.7.A(DML)isalanguagethatenablesuserstoaccessormanipulatedata.8.Adatabaseschemaisspecifiedbyasetofdefinitionsthatareexpressedusinga(datadictionary).9.A(transaction)isaunitofprogramexecutionthataccessesandpossiblyupdatesvariousdataitems.10.The(lock-basedprotocol)allowsatransactiontolockanewdataitemonlyifthattransactionhasnotyetunlockedanydataitem.三、[12分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集++.是.不是四、[12分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集ADC}。.把R分解成R=(A,C,E)和R(B,D,E),試判別此分12.求F的一個(gè)CanonicalCover正則覆蓋,規(guī)范覆蓋;.給出R的一個(gè)分解,使其滿足下列三個(gè)條件:①.分解后的每一個(gè)關(guān)系模式都屬于;②.無損連接;.是ii.T2,T1,T3[16分]設(shè)有實(shí)體c建筑公司e員工p建筑工程項(xiàng)目,、試畫出E-R圖。、試根據(jù)所畫的E-R圖,設(shè)計(jì)出關(guān)系數(shù)據(jù)庫。primarykey(e#,p#)foreignkey(e#,p#)七、[12分]設(shè)有關(guān)系數(shù)據(jù)庫:d(d#,dn,dx,da,dt,s#)p(p#,pn,px,w#)dp(d#,p#,wa)s(s#,sn,sl)d#dadt依次分別表示醫(yī)生的編號(hào)、姓名、p#、pn和px依次分別表示住院患者的編號(hào)、姓名和s#、sn和sl依次分別表示醫(yī)院科室的編號(hào)、名稱和地d))dn,dadt=”prof”dp))p#,pndn=”wang”p#,d#p#、whereS3’andf’whereda>all(selectdafromdwhere’S5)3.selectp#,pafromp九、[6分]SQL定義,此view的名稱為。應(yīng)用:求每個(gè)科室的編號(hào)和此科室的醫(yī)生的平均年齡。二、[10分]填空題(在下列各小題中的括號(hào)部分省略了數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在其后用英11.Thecollectionofinformationstoredinthedatabaseataparticularmomentiscalledan(thedatabase.)of12.A()isalanguagethatenablesuserstoaccessormanipulatedataasorganizedbytheappropriatedatamodel.13.Apersonwhohassuchcentralcontroloverthesystemiscalleda(14.Applicationprogramsaresaidtoexhibit)iftheydonotdependonthe).(physicalschema,andthusneednotberewrittenifthe15.A()isacollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,andconsistencyconstraints.16.Theoveralldesignofthedatabaseiscalledthe().)isasetofthesametypethat18.Wechooseaminimalsuperkeyforeachentitysetfromamongitssuperkeys;theminimalsuperkeyistermed).19.Anyrelationthatisnotpartofthelogicalmodel,butismadevisibletoauserasavirtualrelation,iscalleda().20.SQLallowstheuseof()valuestoindicateabsenceofinformationaboutthevalueofanattribute.三、[8分]每個(gè)運(yùn)動(dòng)員保存?zhèn)€人記錄,包括:姓名、性別、年齡、身份證號(hào)。對(duì)每項(xiàng)比賽存有:比賽編號(hào)、比賽時(shí)間、地點(diǎn)、比分、參加比賽的球隊(duì)名稱。還應(yīng)記錄上場(chǎng)隊(duì)員在每場(chǎng)比E-R圖,并加以必要的說明。四、[8分]根據(jù)下面的E-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出branch-cityassets五、[16分]考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-name,street,city)works(employee-name,company-name,)company(company-name,)a.找出所有為FirstBankCorporation工作的員工的名字b.找出比所有FirstBankCorporation員工的工資都高的c.六、[10分]設(shè)有關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={A。給出R的一個(gè)無損連接的BCNF分解。七[10分]設(shè)有關(guān)系模式(A,B,C,D,ER上的函數(shù)、依賴集F={A,A(AB)?+八、[16分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={ABC,DE,D}。1R分解成R=(A,C,E和R(B,D,E),試判別此分12九、[10分]如下所示的調(diào)度是沖突可串行化的嗎?如果是,TT12read(B)read(A)write(A)28、Viewviewsarevirtualrelationsdefinedbyaquery29、DBMSAdatabasemanagementsystemconsistsofacollectionofinterrelateddataandacollectionofprogramstoaccessthatdata.30、QueryLanguageAquerylanguageinwhichauserrequestsinformationfromthedatabase.二、[10分]填空題(在下列各小題中的括號(hào)部分省略了數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在其后用英21.Thecollectionofinformationstoredinthedatabaseataparticularmomentiscalledan(instance)ofthedatabase.22.A(DML)isalanguagethatenablesuserstoaccessormanipulatedataasorganizedbytheappropriatedatamodel.23.Apersonwhohassuchcentralcontroloverthesystemiscalleda(DBA).24.Applicationprogramsaresaidtoexhibit(physicaldataindependence)iftheydonotdependonthephysicalschema,andthusneednotberewrittenifthephysicalschemachanges.25.A(DataModel)isacollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,andconsistencyconstraints.26.Theoveralldesignofthedatabaseiscalledthe(databaseschema).27.An(entity)isasetofthesametypethatsharethesameproperties,orattributes.28.Wechooseaminimalsuperkeyforeachentitysetfromamongitssuperkeys;theminimalsuperkeyistermedtheentityseandidatekey).29.Anyrelationthatisnotpartofthelogicalmodel,butismadevisibletoauserasavirtualrelation,iscalleda(view).30.SQLallowstheuseof(null)valuestoindicateabsenceofinformationaboutthevalueofanattribute.三、[8分]每個(gè)運(yùn)動(dòng)員保存?zhèn)€人記錄,包括:姓名、性別、年齡、身份證號(hào)。對(duì)每項(xiàng)比賽存有:比賽編號(hào)、比賽時(shí)間、地點(diǎn)、比分、參加比賽的球隊(duì)名稱。還應(yīng)記錄上場(chǎng)隊(duì)員在每場(chǎng)比E-R圖,并加以必要的說明。四、[8分]根據(jù)下面的E-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出account-numberbalancebranch-namebranch-cityassetsaccount(account_number,balance,branch_name)primarykey(account_number)foreignkey(branch_name)branch(branch_name,branch_city,assets)primarykey(branch_name)customer(customer_name,customer_city)primarykey(customer_name)foreignkey(customer_name)五、[16分]考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-name,street,city)works(employee-name,company-name,)company(company-name,)a.找出所有為FirstBankCorporation工作的員工的名字selectemployee-namefromworkswhere’FirstBankCorporation’b.找出比所有FirstBankCorporation員工的工資都高的Selectemployee-nameFromworksWherecompany-name=’FirstBankCorporation’)c.Selectcompany-name,avg(salary)FromworksGroupbycompany-nameOrderbycompany-namedescSelectemployee-nameFromemployee,works,companyWhereemployee.employee-name=works.employee-nameandWpany-name=pany-nameandemployee.city=company.city六、[10分]設(shè)有關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={A。給出R的一個(gè)無損連七[10分]設(shè)有關(guān)系模式(A,B,C,D,ER上的函數(shù)、依賴集F={A,A(AB)?++八、[16分]設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F={ABC,DE,D}。1R分解成R=(A,C,E和R(B,D,E),試判別此分12.不是九、[10分]如下所示的調(diào)度是沖突可串行化的嗎?如果是,TT12readread(A)read(A)1.是2.T1,T22DataDictionary3Transaction[10分]填空題(在答題紙上寫好小1.Thecollectionofinformationstoredinthedatabaseataparticularmomentiscalledan(2.A()isalanguagethatenablesuserstoaccessormanipulatedataasorganizedbytheappropriatedatamodel.).)iftheydonotdependonthephysicalschema,andthusneednotberewrittenifthephysicalschemachanges.5.A()isacollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,andconsistencyconstraints.6.Theoveralldesignofthedatabaseiscalledthe(7.An()isasetofthesametypethatsharethesameproperties,orattributes.8.Wechooseaminimalsuperkeyforeachentitysetfromamongitssuperkeys;theminimalsuperkeyistermedtheentityset’s).9.Anyrelationthatisnotpartofthelogicalmodel,butismadevisibletoauserasavirtual).relation,iscalleda().)valuestoindicateabsenceofinformationaboutthevalueStudent有屬性學(xué)號(hào)學(xué)生姓名age(年齡、bno(班級(jí)號(hào))總成績屬性。Teacher與StudentSuperviseTeacher與CourseTeach二十七、[12分]E-R八、[12分設(shè)有屬于1NF的關(guān)系模式R=(A,B,C,D,R上的函數(shù)依賴集F包含如下函數(shù)依賴F={ABC,A,C,BCD,A}TT32、DBMS:Adatabasemanagementsystemconsistsofacollectionofinterrelateddataandacollectionofprogramstoaccessthosedata.33、Datadictionary:Adatadictionaryisafilethatcontainsmetadata,thatisdataaboutdata.34、Transaction:Thetransactionisaunitofprogramexecutionthataccessesandpossiblyupdatesvariousdataitems.10.null(5)正確描述出Teacher、Course、Teach、Supervise、Student五個(gè)實(shí)體集及聯(lián)系集及其相關(guān)屬性—5分Course(cno,cname,mark)主鍵:{cno}–2分Teacher(tno,tname,major)主鍵:{tno}–2分Student(sno,sname,age,bno,tno,score)主鍵:sno外鍵:tno(1.createtableCourse(majorchar(8)primarykey(tno))–1分snamechar(10),ageinteger,tnochar(10),bnochar(

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論