资源目录
压缩包内文档预览:
编号:211097282
类型:共享资源
大小:12.43MB
格式:ZIP
上传时间:2022-05-05
上传人:考****
认证信息
个人认证
武**(实名认证)
山西
IP属地:山西
30
积分
- 关 键 词:
-
数据库系统概念第六版
数据库
系统
概念
第六
配套
课后
习题
答案
- 资源描述:
-
《数据库系统概念第六版》配套课后习题答案,数据库系统概念第六版,数据库,系统,概念,第六,配套,课后,习题,答案
- 内容简介:
-
CHAPTER18Parallel DatabasesPractice Exercises18.1In a range selection on a range-partitioned attribute, it is possible thatonly one diskmay needtobe accessed.Describe the benefits and draw-backs of this property.Answer: If there are few tuples in the queried range, then each querycanbeprocessedquicklyonasingledisk.Thisallowsparallelexecutionof queries with reduced overhead of initiating queries on multipledisks.On the other hand, if there are many tuples in the queried range, eachquery takes a long time to execute as there is no parallelism withinits execution. Also, some of the disks can become hot-spots, furtherincreasing response time.Hybrid range partitioning, in which small ranges (a few blocks each)are partitioned in a round-robin fashion, provides the benefits of rangepartitioning without its drawbacks.18.2Whatformofparallelism(interquery,interoperation,orintraoperation)is likely to be the most important for each of the following tasks?a.Increasing the throughput of a system with many small queriesb.Increasing the throughput of a system with a few large queries,when the number of disks and processors is largeAnswer:a.When there are many small queries,inter-query parallelismgivesgood throughput. Parallelizing each of these small queries wouldincreasetheinitiationoverhead,withoutanysignificantreductionin response time.b.With a few large queries, intra-query parallelism is essential toget fast response times. Given that there are large number ofprocessors and disks, only intra-operation parallelism can takeadvantage of the parallel hardware for queries typically have2122Chapter 18Parallel Databasesfew operations, but each one needs to process a large number oftuples.18.3Withpipelinedparallelism,itisoftenagoodideatoperformseveralop-erationsinapipelineonasingleprocessor,evenwhenmanyprocessorsare available.a.Explain why.b.Would the arguments you advanced in part a hold if the machinehas a shared-memory architecture? Explain why or why not.c.Would the arguments in part a hold with independent paral-lelism? (That is, are there cases where, even if the operations arenot pipelined and there are many processors available, it is still agood idea to perform several operations on the same processor?)Answer:a.The speed-up obtained by parallelizing the operations would beoffset by the data transfer overhead, as each tuple produced byan operator would have to be transferred to its consumer, whichis running on a different processor.b.In a shared-memory architecture, transferring the tuples is veryefficient. So the above argument does not hold to any significantdegree.c.Even if two operations are independent, it may be that they bothsupply their outputs to a common third operator. In that case,running all three on the same processor may be better than trans-ferring tuples across processors.18.4Consider join processing using symmetric fragment and replicate withrange partitioning. How can you optimize the evaluation if the joincondition is of the form | r.A s.B | k, where k is a small constant?Here, | x | denotes the absolute value of x. A join with such a joincondition is called a band join.Answer: Relationr is partitioned into n partitions,r0,r1,.,rn1, ands is also partitioned into n partitions, s0,s1,.,sn1. The partitions arereplicated and assigned to processors as shown below.Practice Exercises23. . . . . . . .s0s1s2s3sn 1r0r1r2rn 1P0,0P0,1P1,0P1,1P1,2P2,1P2,2P2,3Pn1,n1Each fragment is replicated on 3 processors only, unlike in the generalcase where it is replicated on n processors. The number of processorsrequired is now approximately 3n, instead of n2in the general case.Therefore given the same number of processors, we can partition therelationsintomorefragmentswiththisoptimization,thusmakingeachlocal join faster.18.5Recall that histograms are used for constructing load-balanced rangepartitions.a.Suppose you have a histogram where values are between 1 and100, and are partitioned into 10 ranges, 110, 1120, ., 91100,with frequencies 15, 5, 20, 10, 10, 5, 5, 20, 5, and 5, respectively.Give a load-balanced range partitioning function to divide thevalues into 5 partitions.b.Writeanalgorithmforcomputingabalancedrangepartitionwithppartitions,givenahistogramoffrequencydistributionscontain-ing n ranges.Answer:a.A partitioning vector which gives 5 partitions with 20 tuples ineach partition is: 21,31,51,76. The 5 partitions obtained are120, 2130,3150, 5175 and76100. Theassumptionmadein arriving at this partitioning vector is that within a histogramrange, each value is equally likely.b.Let the histogram ranges be called h1,h2,.,hh, and the parti-tionsp1, p2,., pp. Let the frequencies of the histogram ranges be24Chapter 18Parallel Databasesn1,n2,.,nh. Each partition should contain N/p tuples, whereN = 6hi=1ni.To construct the load balanced partitioning vector, we need todetermine the value of the kth1tuple, the value of the kth2tuple andsoon,wherek1= N/p,k2= 2N/p etc,untilkp1.Thepartitioningvector will then be k1,k2,.,kp1. The value of the kthituple isdetermined as follows. First determine the histogram range hjinwhich it falls. Assuming all values in a range are equally likely,the kthivalue will besj+?ej sj?kijnjwheresj:first value in hjej:last value in hjkij:ki 6j1l=1nl18.6Large-scale parallel database systems store an extra copy of each dataitem on disks attached to a different processor, to avoid loss of data ifone of the processors fails.a.Instead of keeping the extra copy of data items from a processorat a single backup processor, it is a good idea to partition thecopies of the data items of a processor across multiple processors.Explain why.b.Explain how virtual-processor partitioning can be used to ef-ficiently implement the partitioning of the copies as describedabove.c.What are the benefits and drawbacks of usingRAIDstorage in-stead of storing an extra copy of each data item?Answer: FILL18.7Suppose we wish to index a large relation that is partitioned. Canthe idea of partitioning (including virtual processor partitioning) beapplied to indices? Explain your answer, considering the followingtwo cases (assuming for simplicitythat partitioning as well as indexingare on single attributes):a.Where the index is on the partitioning attribute of the relation.b.Where the index is on an attribute other than the partitioningattribute of the relation.Answer: FILL18.8Suppose a well-balanced range-partitioning vector had been chosenfor a relation, but the relation is subsequently updated, making thepartitioning unbalanced. Even if virtual-processor partitioning is used,Practice Exercises25a particular virtual processor may end up with a very
- 温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

人人文库网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。