下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
理工大學(xué)課程考試試卷(學(xué)生考試用)課程名稱 數(shù)據(jù)庫系統(tǒng)(英 學(xué)分: 考試方式:閉卷滿分分值:70 考試時間:120 2008年11月20日組卷教師(簽字): 學(xué)生班級 學(xué) Question1(25points,1perWhichisnotthemainelementinEREntitiesB)AttributesC)RelationshipsD)WhichofthefollowingstatementsaboutE/Rmodelsis/areMany-to-manyrelationshipscannotberepresentedinE/R-RelationshipsetscanhaveattributesoftheirAllmany-to-onerelationshipsarerepresentedbyarelationshipbetweenaweakandanon-weakentityset.A)IIonly.B)IIIonly.C)IIandIIIonly.D)IandIIIfweconvertthefollowingERdiagramtorelationsinthestandardwaydescribedinthetextbook,whichsetofattributeswouldnotappearintheschemaofanyrelation? CAB CAB B) C) D)WhichofthefollowingisArelationlookslikeatableofArelationtypicallycontainsasetofInarelationrowsarecalledEachrowhasarowheadercalledanLetR(A,B,C)satisfythefollowingfunctionaldependencies(FDs):AB->C,BC->A,andAC->B.TheclosureofA(i.e.,A+)is B) C) D)1ConsiderrelationR(A,B,C,D,E)withFDsA->B,BC->E,DE->AWhichofthefollowingfunctionaldependencydoesnotholdinAC- B)AE- C)BC- D)DE-ConsiderrelationR(A,B,C,D,E)withFDsA->B,AB->CD,D->ABCEWhichofthefollowingarekeysoftherelationI.II.III.I B)IandIIC)IIandIII D)I,II,andSupposewehavearelationR(A,B,C,D,E)andtheFD’sA->DE,D->B,andE->C.IfrojectR(andthereforeitsFD’s)ontoschema(ABC),whatistrueaboutthekey(s)for(ABC)?onlyABCisakeyB)onlyAisaC)onlyDEisakeyD)A,B,andCareeachConsiderrelationS(A,B,C)withdependenciesA->BandB->->C.Ofthefollowingdependencies:B-A->-B->- ustnecessarilyholdinII B)IIIonlyC)IandII D)IIandIIIConsiderarelationR(A,B,C,D,E)withthefollowingA->B,A->C,BD-WhichFD’sareBCNFviolationsbutnot3NFA->C B)BD->AC)A->BandA->C D)A->BandBD->AWhichofthefollowingstatementsareAllrelationsin3NFarealsoinAllrelationswithonlytwoattributesareinForanyrelationschema,thereisadependency-preservingpositioninto3NF.A)I B)III C)Iand D)IIandfollowingexpressionsofrelationalalgebraarecorrect?R∩S=R-(R-R∩S=S-(S-R∩S=A)I B)IandIIC)I,II,and D)NoneoftheConsiderrelationsR(A,B)andS(B,C)wherethenumbersoftuplesinRandSare5000and3000respectively,andBisaprimarykeyonS.TheexpectednumberoftuplesinR?SislessthanorequaltolessthanorequaltogreaterthangreaterthanSupposerelationR(A,B,C)hastheUsingbagprojectionandtheta-join,howmanytuplesappearintheresultofπA,B(R)?R.B<S.B(ρS(A,B)(πB,C(R)))? B) C) D)InSQL3-valuedlogic,whatisthevalueofthefollowingexpression:(x<yORx>=yORZ=3)?TRUEorUNKNOWN,butneverFALSEorUNKNOWN,butneverTRUEorFALSE,butneverTRUE,FALSE,orInthefollowing,theschemaofRisR(a,b).Q1:SELECTaFROMR;Q2:(SELECTaFROMR)UNION(SELECTaFROMQ1andQ2producethesameTheanswertoQ1isalwayscontainedintheanswertoTheanswertoQ2isalwayscontainedintheanswertoQ1andQ2producedifferent第2Considerrelation'Grades'andthequerygivenABCFROMGrades cs145_grade>90)OR(cs145_grade<50);Whichstudents'tuplesareBandC B)AandCC)A D)A,B,andWehavethefollowingdealershipdatainourWearetryingtofigurehowmanycarshavebeensoldsofar,sowequerythedatabaseviathefollowing:SELECTCOUNT(Cars_sold)fromWhatdoesthequery B) C) D)NoneoftheConsiderthefollowingqueryontherelationR(A,B,C, FROMRGROUPBYA,AssumeA,B,C,DtakeintegerWhichofthefollowingcanappearinthepositionmarkedas[...II B)IandIIC)I,II,and D)SupposerelationR(A,B)currentlyhastuples{(1,2),(3,4)}andrelationS(B,C)currentlyhas{(2,5),(2,4),(4,6),(7,8)}.Thenthenumberoftuplesintheresultoffollowingqueryis:SELECTFROMRNATURALFULLOUTERJOIN B) C) D)SupposewehavetheCREATETABLEBeers CHAR(20)PRIMARY CREATETABLESells FOREIGNKEY(beer)REFERENCESBeers(name)ONDELETESETNULL,ONUPDATEAssumethefollowingdataalreadyexistsinourBeers SellsWeexecutethe oDELETEFROMBeerswhereUPDATEBeerssetName='B4'WhereNow,whatdoesthisquerySELECTFROMWHERESells.BeerISNOT B) C) D)3CREATETRIGGERAFTERINSERTONTime_TableREFERENCINGNEWASNNNFOREACHROWWHEN(NNN.a*NNN.b>INSERTINTOTime_TableVALUES(NNN.a-1,NNN.b+Whichoneofthetuplesbelow,insertedintoanemptyTimes_table,wouldNOTresultinTime_Tablecontainingexactly3tuples? B) C) D)LetassertionAaboutrelationEmployees(name,dept,salary)bedeclaredbythefollowing:CREATEASSERTIONACHECK(‘Toy’INSELECTdeptGROUPBYdeptHAVINGEveryemployeemakingatleast$50,000mustbeintheToyOnlytheToyDepartmentmayhavea agesalaryof$50,000orislessthan$50,000.isexecutedornoneof B)C) D)AssumeAistheowneroftherelationtowhichprivilegePrefers.Afterthefollowingsteps,1AGRANTPTOBWITHGRANT2AGRANTPTODWITHGRANT3BGRANTPTOCWITHGRANT4CGRANTPTOBWITHGRANT5DGRANTPTO6AREVOKEPFROMB7AREVOKEPFROMDwhichuser(s),besidesA,haveprivilegeC B)D C)CandD D)B,C,andQuestion2(181.(10points)ConsiderthefollowingrelationalSale(clerk,store,city,date,item#,//records lerksoldanitemonaparticularItem(item#,size,//recordspricesandavailablesizesforMakethefollowingassumptions,andonlytheseassumptions,abouttherealworldbeingmodeled:EachclerkworksinoneEachstoreisinoneAgivenitem#alwayshasthesameprice,regardlessofEachitemisavailableinoneormoresizes.Herearetheproblems:Basedontheassumptionsabove(andnoothers),specifyanappropriatesetofcompleynontrivialfunctionaldependenciesforrelationsSaleandItem.(3points)Basedontheassumptionsabove(andnoothers),specifyallkeysforrelationsSaleandItem,respectively.(2points)Basedontheassumptionsabove(andnoothers),givethehighestnormalformofrelationsSaleandItem,respectively.(2points)IfrelationsSaleandItemarenotinBoyce-CoddNormalForm(BCNF),posetherelationssotheyareinBCNF.Underlinekeyattributesforeachrelation.(342.ConvertthefollowingE-Rdiagramtoarelationaldatabaseschema,indicatingtheprimarykeysandtheforeignkeysfortherelations.(8
Question3(27Thefollowingsixtablesareforabankingmanagementsystem:branch(branch_name,branch_city,assets)customer(customer_number,customer_name,customer_address)loan(loan_number,branch_name,amount)borrower(customer_number,loan_number)account(account_number,branch_name,balance)depositor(customer_number,account_number) ):storesinformationaboutbranchesofthecustomer(顧客)storesinformationabout 人):storesinformationaboutwhichborrowerownswhichaccount(存款賬戶):storesinformationaboutdepositor(存款人)storesinformationaboutwhichcustomerownswhichDataasserts,amount,otherBasedonthegivingrelations,writeexpressionsofrelationalalgetionaltoanswerthefollowingqueries.(7points)Findtheloannumberforeachloanofanamountgreater$1200.(1Findthenamesofallcustomerswhohavealoan,anaccount,orboth,fromthebank.(2points)FindtheNo.ofallcustomerswhohavealoanatthe‘Perryridge’branchbutdonothaveanaccountatanybranchofthebank.(2Findthelargestaccountbalance.(2WritetheabovequeriesinSQL.Not
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年廠房租賃補充協(xié)議
- 2025年分期付款信用協(xié)議
- 2025年衛(wèi)浴產(chǎn)品設(shè)計合同
- 中國阿奇霉素腸溶片市場全面調(diào)研及行業(yè)投資潛力預(yù)測報告
- 2025版木材認(rèn)證機構(gòu)服務(wù)采購合同示范3篇
- 二零二五年度公司股權(quán)激勵項目財務(wù)規(guī)劃與預(yù)算合同3篇
- 2025年度儲煤場租賃與煤炭交易結(jié)算服務(wù)合同3篇
- 2025年度新能源行業(yè)競業(yè)限制解除通知
- 2025年度私人車位租賃與車位租賃期限續(xù)簽合同
- 2025年度車庫使用權(quán)轉(zhuǎn)讓及車位租賃權(quán)分配協(xié)議
- 2024多級AO工藝污水處理技術(shù)規(guī)程
- 2024年江蘇省鹽城市中考數(shù)學(xué)試卷真題(含答案)
- DZ∕T 0287-2015 礦山地質(zhì)環(huán)境監(jiān)測技術(shù)規(guī)程(正式版)
- 2024年合肥市廬陽區(qū)中考二模英語試題含答案
- 質(zhì)檢中心制度匯編討論版樣本
- 藥娘激素方案
- 提高靜脈留置使用率品管圈課件
- GB/T 10739-2023紙、紙板和紙漿試樣處理和試驗的標(biāo)準(zhǔn)大氣條件
- 《心態(tài)與思維模式》課件
- C語言程序設(shè)計(慕課版 第2版)PPT完整全套教學(xué)課件
- 危險化學(xué)品企業(yè)安全生產(chǎn)標(biāo)準(zhǔn)化課件
評論
0/150
提交評論