下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、一、Concept explaining 1. ordered index Based on a sorted ordering of the values 2. hash index A hash index organizes the search keys, with their associated pointers, into a hash file structure.3. search key An attribute or set of attributes used to look up records in a file is called a search key. 4.
2、 Transaction A transaction is a unit of program execution that accesses and possibly updates various data items5. conflict serializable We say that a schedule S is conflict serializable if it is conflict equivalent to a serial schedule6.data warehouseA data ware house is a repository of information
3、gathered from multiple sources, stored under a unified schema, at a single site. 7.data mining Date mining refers loosely to the process of semi-automatically analyzing large databases to find useful patterns.8.distributed database system In a distributed database system the database is stored on se
4、veral computers9.local transaction A local transaction is one that accesses data only from sites global transaction10.global transaction A global transaction is one that either accesses data in a site different form the one at which the transaction was initiated, or accesses data in several differen
5、t sites11.homogeneous distributed database In a homogeneous distributed database system, all sites have indentical database-management system software, are aware of one another, and agree to cooperate in processing usersrequests12.heterogeneous distributed databaseA distribute database has to be con
6、structed by linking together multiple already-existing database systems, each with its own schema and possibly running different database-management software 二、Fill blanks 1.A clustering index is an index whose search key also defines the sequential order of the file. 2.To ensure integrity of the da
7、ta,we require that the database system maintain the following properties of the transactions: Atomicity,Consistency , Isolation , Durability . 3. Transactions access data using two operations, write(X), which transfers the data item X from the local buffer of the transaction that executed the write
8、back to the database . 4. Ensuring durability is the responsibility of a software component of the database system called the recovery-management component . 5. If a schedule S can be transformed into a schedule Sby a series of swaps of nonconficting instructions, we say that S and Sare conflict equ
9、ivalent . 6. A recoverable schedule is one where,for each pair of transactions Ti and Tj such that Tj reads a data item previously written by Ti,the commit operation of Ti appears before the commit operation of Tj . 7. A cascadeless schedule is ne where,for each pair of transactions Ti and Tj such t
10、hat Tj reads a data item previously written by Ti,the commit operation of Ti appears before the read operation of Tj . 8.There are main two main modes: shared and exclusive in which a data item may be locked. 9.There are two types of errors: Logical error and System error that may cause a transactio
11、n to fail. 10.According to relative speed, capacity,and resilience to failure, storage media can be classified volatile storage and nonvolatile storage . 11.Block movements between disk and main memory art initiated through the following two operations,output(B) transfers the buffer block B to the t
12、he disk , and replaces the appropriate physical block there.12.The deferred-database modification technique ensures transaction atomicity by recording all database modifications in the log . 13.Server system can be broadly categorized as transaction servers and data servers .14.Transaction-server sy
13、stems,also called query-server systems, provide an interface to which clients can send requests to preform an action,in response to which they execute the action and send back results to the client .15.Data-server systems allow client to interact with the servers .16.The processes that form part of
14、the database system include lock manager process , , database writer process, log writer process, checkpoint process, process monitor process.17.There are two main measures of performance of a database system: (1) throughput , the number of tasks that can be completed in a given time interval, and (
15、2) response time , the amount of time it takes to complete a single task from the time it is submitted.18.Running a given task in less time by increasing the degree of parallelism is called speedup .19.Handling larger tasks by increasing the degree of parallelism is called scaleup .20.There are seve
16、ral reasons for building distributed database systems, including sharing data , Autonomy , and Availability .21.Consider a relation r that is to be stored in the database. There are two approaches to storing this relation in the distributed database: replication and global fragmentation .22.There ar
17、e two different schemes for fragmenting a relation: account .23.Data transparency includes three main forms: fragmentation , and transparency .24.A distributed system may suffer from the same types of failure that a centralized system does. The basic failure types are failure of a site , loss of mes
18、sage, failure of a communication link and Network partition .三、Answer questions 1. How to avoid starvation of transactions? A: We can avoid starvation of transactions by granting locks in the following manner:When a transaction Ti requests a lock on a data item Q in a particular mode M,the concurren
19、cy-control manager grants the lock provided that (1)There is no other transaction holding a lock on Q in a mode that conflicts with M (2)There is no other transaction that is waiting for a lock on Q and that made its lock request before Ti 2. Explains two-phase locking protocol, strict two-phase loc
20、king protocol and rigorous two-phase locking protocol. A:The two-phase locking protocol allows a traction to lock a new data item only if that traction has not yet unlocked any data item. Cascading rollbacks can be avoided by a modification of two-phase locking called the strict two-phase locking pr
21、otocol.This protocol requires not only that locking be two phase,but also taht all exclusive-mode locks taken by a traction be held until that traction commits. Another variant of two-phase locking is the rigorous two-phase locking protocol,which requires that all locks be held until the traction co
22、mmits.3.There are three different logs, please recovery the database with immediate-modification technique,write the final results of A,B and C values of these cases respectively. Fig.1 Three different logA:A-$950 B-$2050 C-$6004. Suppose you were in charge of the database operations of a company wh
23、ose main job is to process transactions. Suppose the company is growing rapidly each year, and has outgrown its current computer system. When you are choosing a new parallel computer,what measure is most relevant-speedup, batch scaleup, or transaction scaleup? Why?A:With increasing scale of operatio
24、ns, we expect that the number oftransactions submitted per unit time increases. On the other hand,we wouldntexpect most of the individual transactions to grow longer, nor would we requirethat a given transaction should execute more quickly now than it did before.Hence transaction scale-up is the mos
25、t relevant measure in this scenario5. Consider a bank that has a collection of sites, each running a database system. Suppose the only way the databases interact is by electronic transfer of money between one another. Would such a system qualify as a distributed database? Why?A:In a distributed syst
26、em, all the sites typically run the same databasemanagement software, and they share a global schema. Each site provides anenvironment for execution of both global transactions initiated at remote sitesand local transactions. The system described in the question does not havethese properties, and he
27、nce it cannot qualify as a distributed database.四、Application1. Given the set of key values as follows. (10,15,21,37,44,51,59,63,72,85,91,97) Assume that the tree is initially empty and values are added inasending order. Please finish following operation:(1) Construct a B+-tree for four pointers. (2
28、) Insert 26 and 32 values into the above B+-tree.(3) Delete 63 value2. Suppose that we are using extendable hashing on a file that contains records with the following search-key values: 2,3,5,7,11,17,19,23,29,31The hash function is h(x)=x mod 8 and buckets can hold three records. 1Construct a extend
29、able hash structure 2Delete 11 3Insert 15 3. Consider the following two transactions: T1: read(A); read(B); if A=0 then B:=B+!; write(B); T2: read(B); read(A); if B=0 then A:=A+!; write(A). Let the consistency requirement be A=0 or B=0, with A=B=0 the initial values.(1) Show a concurrent execution o
30、f T1 and T2 that produces a nonserializable schedule.(2) Is there a concurrent execution of T1 and T2 that produces a serializable schedule, Why? A(1)(2)There is no parallel execution resulting in a serializable schedule. Frompart a. we know that a serializable schedule results in A = 0 B = 0. Suppo
31、sewe start with T1 read(A). Then when the schedule ends, no matterwhen we run the steps of T2, B = 1. Now suppose we start executing T2prior to completion of T1. Then T2 read(B) will give B a value of 0. Sowhen T2 completes, A = 1. Thus B = 1 A = 1 (A = 0 B = 0).Similarly for starting with T2 read(B
32、).4. Is the expression rirj necessarily equal to rjri for the relations of Figure 1.Why? Under what conditions does rirj = rjri hold?In general, ri rj = rj ri. This can be easily seen fromExercise 22.11, in which r s = s r. r s was given in 22.11,whileBy definition, ri rj = Ri (ri rj) and rj ri= Rj
33、(ri rj), whereRi and Rj are the schemas of ri and rj respectively. For Ri (ri rj) to bealways equal to Rj (ri rj), the schemas Ri and Rj must be the same.5. Consider the relations Employee(name, address, salary, plant_number) Machine(machine_number, type, plant_number) Assume that the employee relat
34、ion is fragmented horizontally by plant_number, and that each fragment is stored locally at its corresponding plant site. Assume that the machine relation is stored in its entirety at the Armonk site. Describe a good strategy for processing each of the following queries.a) Find all employees at the
35、plant that contains machine number 1130.b) Find all machines at the Almaden plant.c) Find employeemachine. A:a)i. Perform plant number (machine number=1130 (machine) at Armonk.ii. Send the query name (employee) to all site(s) which are in the resultof the previous query.iii. Those sites compute the answers.iv. Union the answers at the destination site.b) i. Perform plant number = x (machine) at Armonk, where x is the plantnumber for Almaden.ii. Send the answers to the destination site.c) Strategy :i. Group machine at Armonk by plant number
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 建筑工程师建筑结构设计冲刺练习及答案
- 审计项目风险应对专项练习题及答案
- 专利代理师资格考试实务操作模拟试题及答案
- 工厂能耗数据课件
- 水上运输从业资格证考试专项题库及答案
- 房地产经纪人执业资格考试备考习题集及答案
- 工程模板讲解课件
- 2025-2026学年湖南省永州市道县数学三年级下学期期末联考试题含答案解析
- 关于商洽2026年行业展会参展计划的商洽函(4篇)
- 项目合同补充条款审核确认函(4篇)
- 2026哔哩哔哩营销通案
- 广东深圳市华睿欣能投资控股集团有限公司2026届校园招聘考试参考题库及答案解析
- 基于零知识证明的医疗数据共享安全协议
- 老年期痴呆课件
- 20大数据互联网金融电子商务创业项目营销活动推广模板
- 3.1伟大的改革开放 教案高中政治统编版必修一中国特色社会主义
- 羟考酮纳洛酮缓释片-临床用药解读
- DBJT15-60-2019 建筑地基基础检测规范
- 2025年晋江离婚协议书
- 药店医保处方管理制度
- 信息处理与社会责任试题及答案
评论
0/150
提交评论