数据库系统基础教程第五章答案.doc
- 文档编号:238643
- 上传时间:2022-10-07
- 格式:DOC
- 页数:16
- 大小:164.50KB
数据库系统基础教程第五章答案.doc
《数据库系统基础教程第五章答案.doc》由会员分享,可在线阅读,更多相关《数据库系统基础教程第五章答案.doc(16页珍藏版)》请在冰豆网上搜索。
Exercise5.1.1
Asaset:
speed
2.66
2.10
1.42
2.80
3.20
2.20
2.00
1.86
3.06
Average=2.37
Asabag:
speed
2.66
2.10
1.42
2.80
3.20
3.20
2.20
2.20
2.00
2.80
1.86
2.80
3.06
Average=2.48
Exercise5.1.2
Asaset:
hd
250
80
320
200
300
160
Average=218
Asabag:
hd
250
250
80
250
250
320
200
250
250
300
160
160
80
Average=215
Exercise5.1.3a
Asaset:
bore
15
16
14
18
Asabag:
bore
15
16
14
16
15
15
14
18
Exercise5.1.3b
πbore(ShipsClasses)
Exercise5.1.4a
Forbags:
Ontheleft-handside:
GivenbagsRandSwhereatupletappearsnandmtimesrespectively,theunionofbagsRandSwillhavetupletappearn+mtimes.ThefurtherunionofbagTwiththetupletappearingotimeswillhavetupletappearn+m+otimesinthefinalresult.
Ontheright-handside:
GivenbagsSandTwhereatupletappearsmandotimesrespectively,theunionofbagsRandSwillhavetupletappearm+otimes.ThefurtherunionofbagRwiththetupletappearingntimeswillhavetupletappearm+o+ntimesinthefinalresult.
Forsets:
Thisisasimilarcasewhendealingwithbagsexceptthetupletcanonlyappearatmostonceineachset.Thetupletonlyappearsintheresultifallthesetshavethetuplet.Otherwise,thetupletwillnotappearintheresult.Sincewecannothaveduplicates,theresultonlyhasatmostonecopyofthetuplet.
Exercise5.1.4b
Forbags:
Ontheleft-handside:
GivenbagsRandSwhereatupletappearsnandmtimesrespectively,theintersectionofbagsRandSwillhavetupletappearmin(n,m)times.ThefurtherintersectionofbagTwiththetupletappearingotimeswillproducetupletmin(o,min(n,m))timesinthefinalresult.
Ontheright-handside:
GivenbagsSandTwhereatupletappearsmandotimesrespectively,theintersectionofbagsRandSwillhavetupletappearmin(m,o)times.ThefurtherintersectionofbagRwiththetupletappearingntimeswillproducetupletmin(n,min(m,o))timesinthefinalresult.
TheintersectionofbagsR,SandTwillyieldaresultwheretupletappearsmin(n,m,o)times.
Forsets:
Thisisasimilarcasewhendealingwithbagsexceptthetupletcanonlyappearatmostonceineachset.Thetupletonlyappearsintheresultifallthesetshavethetuplet.Otherwise,thetupletwillnotappearintheresult.
Exercise5.1.4c
Forbags:
Ontheleft-handside:
GiventhattuplerinR,whichappearsmtimes,cansuccessfullyjoinwithtuplesinS,whichappearsntimes,weexpecttheresulttocontainmncopies.AlsogiventhattupletinT,whichappearsotimes,cansuccessfullyjoinwiththejoinedtuplesofrands,weexpectthefinalresulttohavemnocopies.
Ontheright-handside:
GiventhattuplesinS,whichappearsntimes,cansuccessfullyjoinwithtupletinT,whichappearsotimes,weexpecttheresulttocontainnocopies.AlsogiventhattuplerinR,whichappearsmtimes,cansuccessfullyjoinwiththejoinedtuplesofsandt,weexpectthefinalresulttohavenomcopies.
Theorderinwhichweperformthenaturaljoindoesnotmatterforbags.
Forsets:
Thisisasimilarcasewhendealingwithbagsexceptthejoinedtuplescanonlyappearatmostonceineachresult.Iftherearetuplesr,s,tinrelationsR,S,Tthatcansuccessfullyjoin,thentheresultwillcontainatuplewiththeschemaoftheirjoinedattributes.
Exercise5.1.4d
Forbags:
SupposeatupletoccursnandmtimesinbagsRandSrespectively.IntheunionofthesetwobagsRÈS,tupletwouldappearn+mtimes.Likewise,intheunionofthesetwobagsSÈR,tupletwouldappearm+ntimes.Bothsidesoftherelationyieldthesameresult.
Forsets:
Atupletcanonlyappearatmostonetime.TupletmightappeareachinsetsRandSoneorzerotimes.ThecombinationsofnumberofoccurrencesfortupletinRandSrespectivelyare(0,0),(0,1),(1,0),and(1,1).OnlywhentupletappearsinbothsetsRandSwilltheunionRÈShavethetuplet.ThesamereasoningholdswhenwetaketheunionSÈR.
Thereforethecommutativelawforunionholds.
Exercise5.1.4e
Forbags:
SupposeatupletoccursnandmtimesinbagsRandSrespectively.IntheintersectionofthesetwobagsR∩S,tupletwouldappearmin(n,m)times.LikewiseintheintersectionofthesetwobagsS∩R,tupletwouldappearmin(m,n)times.Bothsidesoftherelationyieldthesameresult.
Forsets:
Atupletcanonlyappearatmostonetime.TupletmightappeareachinsetsRandSoneorzerotimes.ThecombinationsofnumberofoccurrencesfortupletinRandSrespectivelyare(0,0),(0,1),(1,0),and(1,1).OnlywhentupletappearsinatleastoneofthesetsRandSwilltheintersectionR∩Shavethetuplet.Thes
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数据库 系统 基础教程 第五 答案
![提示](https://static.bdocx.com/images/bang_tan.gif)