数据库系统概念(database system concepts)英文第六版 课后练习题 答案 第10章_第1页
数据库系统概念(database system concepts)英文第六版 课后练习题 答案 第10章_第2页
数据库系统概念(database system concepts)英文第六版 课后练习题 答案 第10章_第3页
数据库系统概念(database system concepts)英文第六版 课后练习题 答案 第10章_第4页
数据库系统概念(database system concepts)英文第六版 课后练习题 答案 第10章_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 File hasbeennopartial-write,buttheydifferincontent,thenwereplace2thecontentsoftherstblockwiththecontentsofthesecond,orviceversa.Thisrecoveryprocedureensuresthatawritetostablestorageeither succeeds completely (that is, updates both copies) or resultsin no change.The requirement of comparing every co

2、rresponding pair of blocksduringrecoveryisexpensivetomeet.Wecanreducethecostgreatlyby keeping track of block writes that are in progress, using a smallamount of nonvolatile RAM. On only blocks for whichwrites werein progressneed tobe compared.b. Theideaissimilarhere.Foranyblockwrite,theinformationbl

3、ockiswrittenrstfollowedbythecorrespondingparityblock.Atthetimeof each set consisting of the nthblock of each of the disksis considered. If none of the blocks in the set have been partially-written, and the parity block contents are consistent with the con-tentsoftheinformationblocks,thennofurtheract

4、ionneedbetaken.Ifanyblockhasbeenpartially-written,itscontentsarereconstructedusingtheotherblocks.Ifnoblockhasbeenpartially-written,buttheparity block contents do not agree with the information block con-tents, the parity blocks contents arereconstructed.10.4 Answer:a. Although moving record 6 to the

5、 space for 5, and moving record 7to the space for 6, is the most straightforward approach, it requiresmoving themost records,and involves the most accesses.b. Movingrecord7tothespacefor5movesfewerrecords,butdestroysany orderingin the le.c. Marking the space for 5 as deleted preserves ordering and mo

6、vesno records, but requires additional overhead to keep track of allof the free space in the le. This method may lead to too many“holes” in the le, which if not compacted from time to time, willaffect performance because of reduced availability of contiguousfreerecords.10.5 Answer: (Weuse “i” to den

7、ote a pointerto record“i”.)The originalle ofFigure10.7.Exercises3record0record1record2record3record4record5record6record7record8record9record10record1165000 44000095000 6Gold87000CalieriSinghCrickBrandtKim6200080000720009200080000a. The le after insert(24556, Turnamian,Finance, 98000).record0record1

8、record2record3record4record5record6record7record8record9record10record1165000980004000095000 687000CalieriSinghCrickBrandtKim6200080000720009200080000b. The le after delete record2. File 4record0record1record2record3record4record5record6record7record8record9record10record116500098000 495000 687000Ca

9、lieriSinghCrickBrandtKim6200080000720009200080000Thefreerecordchaincouldhavealternativelybeenfromtheheaderto 4,from 4 to 2,and nally from 2 to 6.c. The le after insert(34556, Thompson, Music,67000). 4record0record1record2record3record4record5record6record7record8record9record10record1165000980006700

10、095000 6Gold87000CalieriSinghCrickBrandtKim620008000072000920008000010.6 Answer:The relationsectionwith threetuples is as follows.coursesec1semesterFallbuildingPackardslot514H1Exercises5IDididyearCS-101CS-347CS-347CS-101FallFallFallFallAA-ACBIO-301CS-347CS-101CS-101CS-347BIO-301CS-101CS-347BIO-301BI

11、O-301BIO-301SummerFallFallFallFallSummerFallFallSummerSummerSummernullAFA-AnullAAnullnullnullThe multitable clusteringfor the above twoinstances can be taken as:BIO-301SummerPainterABIO-301BIO-301BIO-301BIO-301BIO-3011SummerSummerSummerSummerSummer2009nullnullnullnullnull1010012812345456785432176543

12、CS-34711111Fall20092009200920092009TaylorC10.7 Answer:a. Everytime a record is inserted/deleted, check if the usage of theblock has changed levels. In that case, update the corresponding File bits. Note that we dont need to access the bitmaps at all unless6the usage crosses a so in most of the cases

13、 there is nooverhead.b. When freespaceforalargerecordora setofrecordsissought,thenmultiple free list entries may have to be scanned before nding apropersized one,so overheadsaremuchhigher.Withbitmaps,onepage of bitmap can store free info for many pages, sospent forI/Onding free space is minimal. whe

14、n a whole block or alarge part of it is deleted, bitmap technique is more convenient forupdating freespace information.10.8 Answer: Hashtableisthecommonoptionforlargedatabasebuffers.Thehash function helps in locating the appropriate bucket, on which linearsearchis performed.10.9 Answer:a.is preferab

15、le towhere R 1 R is computed by using12a nested-loop processing strategy where each tuple in R must becomparedtoeachblockin R .Afterthersttupleof R isprocessed,the next needed block is the rst one in R . However, since it isthe least recently used, the2121buffermanagement strategy wouldreplacethat b

16、lock if a new block was needed bythe system.b.is preferable to where R 1 R is computed by sorting12the relations by join values and then comparing the values by pro-ceeding through the relations. Due to duplicate join values, it maybenecessaryto“back-up”inoneoftherelations.This “backing-up”could cross a block boundary into the most recently used block,wh

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论