西安交大数据库复习题3.doc

西安交大数据库复习题3.doc

ID:48358197

大小:139.05 KB

页数:2页

时间:2019-11-26

西安交大数据库复习题3.doc_第1页
西安交大数据库复习题3.doc_第2页
资源描述:

《西安交大数据库复习题3.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、复习题31.[DisksandAccessTime]Consideradiskwithasector扇区sizeof512bytes,63sectorspertrack磁道,16,383trackspersurface盘面,8double-sidedplatters柱面(i.e.,16surfaces).Thediskplattersrotateat7,200rpm(revolutionsperminute).Theaverageseektimeis9msec,whereasthetrack-to-trackseek

2、timeis1msec.Supposethatapagesizeof4096bytesischosen.Supposethatafilecontaining1,000,000recordsof256byteseachistobestoredonsuchadisk.Norecordisallowedtospantwopages(usethesenumbersinappropriateplacesinyourcalculation).1)Whatisthecapacityofthedisk?2)Ifthefileisar

3、rangedsequentiallyonthedisk,howmanycylindersareneeded?2.ConstructaB+-treeforthefollowingsetofkeyvalues:(2,3,5,7,11,17,19,23,29,31)Assumethatthetreeisinitiallyemptyandvaluesareaddedinascendingorder.ConstructB+-treesforthecaseswherethenumberofpointersthatwillfiti

4、nonenodeisasfollows:a.Fourb.Sixc.Eight3.ForeachB+-treeofExercise2,showtheformofthetreeaftereachofthefollowingseriesofoperations:a.Insert9.b.Insert10.c.Insert8.d.Delete23.e.Delete19.4.Supposethatweareusingextendablehashingonafilethatcontainsrecordswiththefollowi

5、ngsearch-keyvalues:2,3,5,7,11,17,19,23,29,31Showtheextendablehashstructureforthisfileifthehashfunctionish(x)=xmod8andbucketscanholdthreerecords.5.ShowhowtheextendablehashstructureofPracticeExercise4changesastheresultofeachofthefollowingsteps:a.Delete11.b.Delete

6、31.c.Insert1.d.Insert15.6.ConsidertheinstructorrelationshowninFigure11.1.Figure11.1.Constructabitmapindexontheattributesalary,dividingsalaryvaluesinto4ranges:below50000,50000tobelow60000,60000tobelow70000,and70000andabove.1.设关系r1(A,B,C),r2(C,D,E)有如下特性:r1有200,00

7、0个元组,r2有45,000个元组,一块中可容纳25个r1元组或30个r2元组;试估算以下每一种策略计算r1

8、><

9、r2所需存取的块数(假设可用于连接操作的内存数量为300个块):1)块嵌套循环连接2)归并连接(假设r1,r2已按连接属性排序)3)混合散列连接(假设分5路进行散列并且没有偏斜)2.设关系r1(A,B,C(fk)),r2(C,D,E(fk))和r3(E,F),其主码分别为A,C,E。假设r1有35000个元组,r2有25000个元组,r3有10000个元组。试估计r1

10、><

11、r2

12、><

13、r3的元组个数;

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。