复习题31.[DisksandAccessTime]Consideradiskwithasector扇区sizeof512bytes,63sectorspertrack磁道,16,383trackspersurface盘面,8double-sidedplatters柱面(i.e.,16surfaces).Thediskplattersrotateat7,200rpm(revolutionsperminute).Theaverageseektimeis9msec,whereasthetrack-to-trackseektimeis1msec.Supposethatapagesizeof4096bytesischosen.Supposethatafilecontaining1,000,000recordsof256byteseachistobestoredonsuchadisk.Norecordisallowedtospantwopages(usethesenumbersinappropriateplacesinyourcalculation).1)Whatisthecapacityofthedisk?2)Ifthefileisarrangedsequentiallyonthedisk,howmanycylindersareneeded?2.ConstructaB+-treeforthefollowingsetofkeyvalues:(2,3,5,7,11,17,19,23,29,31)Assumethatthetreeisinitiallyemptyandvaluesareaddedinascendingorder.ConstructB+-treesforthecaseswherethenumberofpointersthatwillfitinonenodeisasfollows:a.Fourb.Sixc.Eight3.ForeachB+-treeofExercise2,showtheformofthetreeaftereachofthefollowingseriesofoperations:a.Insert9.b.Insert10.c.Insert8.d.Delete23.e.Delete19.4.Supposethatweareusingextendablehashingonafilethatcontainsrecordswiththefollowingsearch-keyvalues:2,3,5,7,11,17,19,23,29,31Showtheextendablehashstructureforthisfileifthehashfunctionish(x)=xmod8andbucketscanholdthreerecords.5.ShowhowtheextendablehashstructureofPracticeExercise4changesastheresultofeachofthefollowingsteps:a.Delete11.b.Delete31.c.Insert1.d.Insert15.6.ConsidertheinstructorrelationshowninFigure11.1.Figure11.1.Constructabitmapindexontheattributesalary,dividingsalaryvaluesinto4ranges:below50000,50000tobelow60000,60000tobelow70000,and70000andabove.7.设关系r1(A,B,C),r2(C,D,E)有如下特性:r1有200,000个元组,r2有45,000个元组,一块中可容纳25个r1元组或30个r2元组;试估算以下每一种策略计算r1|><|r2所需存取的块数(假设可用于连接操作的内存数量为300个块):1)块嵌套循环连接2)归并连接(假设r1,r2已按连接属性排序)3)混合散列连接(假设分5路进行散列并且没有偏斜)8.设关系r1(A,B,C(fk)),r2(C,D,E(fk))和r3(E,F),其主码分别为A,C,E。假设r1有35000个元组,r2有25000个元组,r3有10000个元组。试估计r1|><|r2|><|r3的元组个数;