rwDISS750finalexamWord文档下载推荐.docx
- 文档编号:19674037
- 上传时间:2023-01-08
- 格式:DOCX
- 页数:25
- 大小:47.28KB
rwDISS750finalexamWord文档下载推荐.docx
《rwDISS750finalexamWord文档下载推荐.docx》由会员分享,可在线阅读,更多相关《rwDISS750finalexamWord文档下载推荐.docx(25页珍藏版)》请在冰豆网上搜索。
a.Cartesianproductofrands,r⨯s.
SQL>
run1a.sql
1select*
2*fromr,s
ABCCDE
------------
a2b2c2c1d1e1
a3b3c3c1d1e1
a2b2c2c2d2e2
a3b3c3c2d2e2
b.rjoins,r|X|r.C=s.Cs.
run1b.sql
2fromr,s
3*wherer.C=s.C
c.rnaturaljoins,r*s.
run1c.sql
1selectr.A,r.B,r.C,s.D,s.E
ABCDE
----------
a2b2c2d2e2
d.rsemi-joins,r|Xs.
run1d.sql
1select*
3whereexists
4(select*
5froms
6*wherer.C=s.C)
ABC
------
a2b2c2
e.ssemi-joinr,s|Xr.
run1e.sql
3whereexists
5fromr
6*wheres.C=r.C)
CDE
c2d2e2
f.rleftouterjoins.
run1f.sql
3*wherer.C=s.C(+)
a3b3c3
g.rrightouterjoins.
run1g.sql
2fromr,s
3*wherer.C(+)=s.C
c1d1e1
h.sleftouterjoinr.
run1h.sql
3*wheres.C=r.C(+)
i.srightouterjoinr.
run1i.sql
3*wheres.C(+)=r.C
j.rfullouterjoins.
run1j.sql
3wherer.C=s.C(+)
4union
5select*
6fromr,s
7*wherer.C(+)=s.C
B.GiventhefollowingtableTandthesetoffunctionaldependenciesF:
T
A
B
C
D
a1
b1
c1
d1
c2
d2
a2
d3
c3
d4
F={A→B,C→B,D→ABC,AC→D}
a.WhatisthekeyfortableT?
(5points)D&
AC
TestA,C,D,&
ACtobekeys:
{A}+={A}
={AB}A→B
ThereforeAisnotakey
{C}+={C}
={CB}C→B
ThereforeCisnotakey
{D}+={D}
={DABC}D→ABC
ThereforeDisakey
{AC}+={AC}
={ACB}A→B
={ACBD}AC→D
ThereforeACisakey
b.WhatisthehighestnormalformfortableT?
Pleaseexplain.(10points)
TableTisof1stnormalformforthefollowingreasons:
1.Itisof1stnormalformbecauseithasnononatomicattributesornestedrelations.
2.ItisNOTof2ndnormalformbecauseeverynonprimeattribute(Binthiscase)is
notfullydependentonthekey(AC).
c.Giventhefollowingrecordsorrows:
(20points)
(a5,b6,c7,d8)
(a2,b2,c1,d8)
(a3,b1,c4,d3)
(a1,b1,c2,d5)
PleaseindicatewhichrecordcanbeaddedintotableTwithoutviolatinganyoffunctional
dependenciesinF.
Iftherecordorrowcannotbelegallyadded,pleaseindicatewhichfunctional
dependencyisviolated.
(a2,b2,c1,d8)violatesF={A→B,C→B,AC→D}
(a3,b1,c4,d3)violatesF={D→ABC}
(a1,b1,c2,d5)violatesF={AC→D}
C.Answerthefollowingmultiplechoicequestions:
(60points)
(pleaseselectthemostappropriateone)
1._____a______isanindexspecifiedontheorderingkeyfieldofanorderedfileofrecords.
a.)Primaryindexb.)Clusteringindex
c.)Secondaryindexd.)Noneoftheabove
2._______C____isanindexspecifiedonthenonkeyorderingfieldofanorderedfileof
records.
a.)Primaryindexb.)Secondary
c.)Clusteringindexd.)Noneoftheabove
3._____b_______isanindexspecifiedonthekeyornonkeynonorderingfieldofafileof
c.)Clusteringindexd.)Noneoftheabove
4.In_______a__________,thenumberof(first-level)indexentriesisequaltothenumberof
datablocksindatafile.
c.)Clusteringindexd.)Noneoftheabove
5.In_______c__________,thenumberof(first-level)indexentriesisequaltothenumberof
distinctindexvaluesindatafile.
a.)Primaryindexb.)Secondary
6.In_______b__________,thenumberof(first-level)indexentriesisequaltothenumberof
recordsindatafile.
7._________b___________is/arethedenseindex(es).
c.)Clusteringindexd.)Bothb.)andc.)
8._________d___________is/arethenondenseindex(es).
c.)Clusteringindexd.)Botha.)andc.)
9.________a___(seenote)___use(s)blockanchoringonthedatafile.
a.)Primaryindexb.)Secondary
NOTE:
Clusteringindexcanalsouseblockanchoringifeverydistinctvalueoftheorderingfieldstartsanewblock;
otherwiseitdoesnot.Theanswergivenaboveassumes“alwaysuse(s)”.Ifthisisnotassumed,thentheanswerisd.)Botha&
c
10.________a_____________usestheleastnumberofblockstoholdnecessaryindexentries
(Assumethenumberofrecordsisverybig).
a.)Primaryindexb.)Secondaryindex
c.)Clusteringindexd.)Multilevelindex
11.________d_____________hastheleastnumberofblockaccessestosearchandretrievea
record(Assumethenumberofrecordsisverybig).
a.)Primaryindexb.)Secondaryindex
12.________d_____________guarantee(s)theaccessstructureisalwaysbalancedwhena
lotofupdatessuchasinsertionsanddeletionsoffilerecordsoccur.
a.)M-WaySearchtreeb.)Dynamichashing
c.)Multilevelindexd.)B-treeandB+-tree
13._______c_________guarantee(s)thatthenumberofindexblockaccessesisequaltothe
leveloftheindexstructures.
c.)Multilevelindexd.)B-treeandB+-tree
14.________d_______operation(s)onrelationtablesis/arematerializationorimplementation
oftherelationshipsofconceptualschemadatabaseinentity-relationshipdiagramormodel.
a.)Selectoperationb.)Cartesianproduct
c.)Projectiond.)Naturaljoin
15.Akeyinadatabasetableisa
a.)minimalsuperkeyb.)apropersupersetofacandidatekey.
c.)propersubsetofacandidatekeyd.)neithera.)norb.)
16.Aforeignkeycanmakereferencetoc
a.)anattributethatisaprimarykeyofanothertable.
b.)anattributethatisaprimarykeyofthesametable.
c.)botha.)andb.)
d.)neithera.)norb.).
17.Areferentialintegrityconstraintstatesc
a.)aforeignkeyattributevaluemustrefertoanexistingprimarykeyvalue.
b.)aforeignkeyattributevaluecanbeNULL.
c.)botha.)andb.).
18.Thehighernormalizeddatabaseschemaimpliesd
a.)moredecomposeddatabasetables.
b.)morejoinoperationswhendatafromthesedecomposedtablesarecombined.
c.)slowerprocessingforqueriesinvolvedthejoiningthesedecomposedtables.
d.)allofa.),b.),andc.).
19.Thelossy-joinmeansd
a.)lossofcorrecttuplesduringthejoinoperation.
b.)lossofspurioustuplesduringthejoinoperation.
c.)lossofjoinpath.
d.)lossofcorrectinformation.
20.Ifadatabasetableisinthefirstnormalform,itisalsoina
a.)thenon-firstnormalform.b.)thesecondnormalform.
c.)thethirdnormalform.d.)theBoyce-Coddnormalform.
21.IfadatabasetableisinBoyce-Coddnormalform,itisalsoind
a.)thefirstnormalform.b.)thesecondnormalform.
c.)thethirdnormalform.d.)allofa.),b.),andc.).
22.Ifadatabasetableisinthethirdnormalform,itisalsoind
c.)theBoyce-Coddnormalform.d.)botha.)andb.)
23.Ifadatabasetableisinthesecondnormalform,itisalsoina
a.)thefirstnormalform.b.)thethirdnormalform.
c.)theBoyce-Coddnormalform.d.)allofa.),b.),andc.).
24.Thelosslessjoinmeansc
a.)nocorrecttuplelost.b.)nospurioustuplelost.
c.)nocorrectinformationlost.d.)nojoinpathlost.
25.Thehighernormalizeddatabaseschemaimpliesd
a.)lessinsertionanomalies.b.)lessdeletionanomalies.
c.)lessupdateanomalies.d.)allofa.),b.),andc.).
26.Ifthereisaone-to-onerelationshipbetweenentityAandB,thenc
a.)thereexistsafunctionaldependencyfromtheprimarykeyinBtotheprimarykeyinA,
i.e.,PK(B)→PK(A).
b.)thereexistsafunctionaldependencyfromtheprimarykeyinAtotheprimarykeyinB,
i.e.,PK(A)→PK(B).
27.Ifthereisaone-to-manyrelationshipfromentityAtoB(Aisonone-side,andBison
many-side),thena
28.Ifthereisamany-to-manyrelationshipbetweenentityAandB,thend
a.)thereexistsafunctionaldependencyfromtheprimarykeyinBtotheprima
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- rwDISS750finalexam