You are on page 1of 7

Kafrelsheikh University Final Exam of

Distributed and Object Data Base


Faculty of Computers and Information
2018/2019 (second Term)
Department of Information systems Date: 23/ 5 / 2019 – Time: 3 hrs

Q1) Choose the correct answer(s): (10 points)

1. In Distributed database system, ............distribution does not necessarily imply that the computer
systems be geographically far apart
(a) physical (b) conceptual (c) psychological (d)logical
2. the entire relation is stored redundantly at 2 or more sites in ………………
(a)Replication (b)Segmentation (c)Fragmentation (d)integration
3. In ……………, The relation is fragmented into groups of tuples so that each tuple is assigned to
at least one fragment.
(a)Horizontal (b)vertical (c) Hybrid (d)Not of the above
fragmentation fragmentation
4. In …………, This model is typically created by Business stakeholders and Data Architects.
(a)conceptual model (b)logical model )c) physical model (d)All of the above
5. ……….. is responsible for starting the execution of transactions that originate at the site.
(a)transaction (b)distributed (c)transaction (d)Not of the above
manager transaction coordinator
6. It is usually desirable to be able to distribute data in a replicated fashion across the machines on a
network ……………
(a) Data (b) Location (c) Fragmentation (d) Replication
Independence Transparency Transparency Transparency
7. In ………., each partition of the database is stored at more than one site, but not at all the sites
(a) fully replicated (b) Partially replicated. (c) Fully duplicated. (d) None of them
8. …………………….. is an area that involves the synchronization of accesses to the distributed
database.
(a) Deadlock (b) Directory (c) Concurrency (d) None of them
Management Management Control
9. ……………………….. is a fundamental approach of Concurrency Control, coordinate concurrent
access to a data item.
(a) Locking (b) timestamping (c) a & b (d) another approach
10. …………….. deals with the competition among users for access to data when the synchronization
mechanism is based on locking
(a) Deadlock (b) Directory (c) Query (d) None of them
Management Management processing
11. a view that is of the system or machine
(a) external view (b) internal view‫اﻟﺻﺢ‬ (c) conceptual view (d) None of them
12. on data processor of DDBMS, run time support processor depend on ………...
(a) LIS (b) LCS (c) GIS (d) GCS
13. Each of the individual DBMSs is free to make its own decision as to what type of information it
wants to provide to the other DBMSs or to the software that controls their global execution, this
refers to: ……...
(a) design (b) communication (c) Heterogeneity (d) execution
autonomy autonomy autonomy
14. In Peer-to-Peer systems ............ is a layer used to handle data fragmentation and replication, the
logical organization of data at each site needs to be described.
(a)local internal (b) global conceptual (c) local conceptual (d) global internal
schema schema schema ‫اﻟﺻﺢ‬ schema
15. The run-time support processor physically accesses the database according to the physical
commands in the schedule generated by ……………………………
(a) The recovery (b) The query (c) both a and b (d) None of them
manager optimizer
16. ………………………… which is responsible for maintaining the main memory buffers and
managing the data accesses.
(a) The local recovery (b) The run-time (c) The local query (d) None of them
manager support processor optimizer
17. In the distributed multi-DBMSs, the ………… Depicts local data organization at each site.
(a) GCS (b) LIS (c) LCS (d) LES
18. The number of tuples of the relation that would be accessed by a user query which is specified
according to a given minterm predicate mi.
(a) minterm (b) Application Info (c) Simple Predicate (d) minterm predicate
selectivity
19. …….. Is a measure that indicates how closely related the attributes are
(a) Attribute (b) Attribute usage (c)clustered attributes (d)Replicated
affinities values attributes
20. The Output of Bond Energy Algorithm is ……….
(a) AU matrix (b) AA matrix (c) CA matrix (d) clustered attribute

Q2) Give a definition of the following terms: distributed database, DDBMS, Inter-query parallelism, intra-
query parallelism, and Mutual Consistency. (5 points)
distributed database: is a collection of multiple, logically interrelated databases distributed over a computer
network.
DDBMS: is the software that manages the DDB and provides an access mechanism that makes this
distribution transparent to the users.
Inter-query parallelism: results from the ability to execute multiple queries at the same time.
intra-query parallelism: is achieved by breaking up a single query into a number of subqueries each of which
is executed at a different site
Mutual Consistency: versus Transaction Consistency, refers to the replicas converging to the same value.

Q3) List and explain


1. the different types of transparencies. (2 points)
o Data Independence
▪ Logical data independence
▪ Physical data independence
o Network Transparency
▪ Location transparency
▪ Fragmentation transparency
o Replication Transparency
o Fragmentation Transparency
▪ horizontal fragmentation: selection
▪ vertical fragmentation: projection
▪ hybrid
2
2. Locking-Based Concurrency Control Algorithms (2 points)
The main idea of locking-based concurrency control is to ensure that a data item that is shared by
conflicting operations is accessed by one operation at a time.
3. Timestamp-Based Concurrency Control Algorithms (2 points)
They select a priori, a serialization order and execute transactions accordingly. To establish this
ordering, the transaction manager assigns each transaction Ti a unique timestamp, ts(Ti), at its
initiation.
A timestamp is a simple identifier that serves to identify each transaction uniquely and is used for
ordering.
4. Deadlock Management and the three Deadlock strategies (2 Points)
-A useful tool in analyzing deadlocks is a wait-for graph (WFG).
-A global deadlock: two transactions that participate in a deadlock condition may be running at
different sites.
-Strategies:
1. Deadlock prevention.
2. Deadlock Avoidance.
3. Deadlock Detection and Resolution.
5. Eager and lazy Update Propagation. (2 points)
Eager Update Propagation: apply the changes to all the replicas within the context of the update
transaction. Typically, eager propagation techniques use 2PC at commit point.
Lazy Update Propagation: the transaction does not wait until its updates are applied to all the copies
before it commits, it commits as soon as one replica is updated.

3
Q4) Draw a diagram showing that:
1. Distributed DBMS Components (4 point)

2. MDBS Architecture with a GCS (2 Points)

4
3. 3PC Protocol Actions (4 points)

Q5) Consider relation ASG in the following Figure. Suppose there are two applications that access ASG. The
first is issued at five sites and attempts to find the duration of assignment of employees given their numbers.
Assume that managers, consultants, engineers, and programmers are located at four different sites. The second
application is issued at two sites where the employees with an assignment duration of less than 20 months are
managed at one site, whereas those with longer duration are managed at a second site. Derive the primary
horizontal fragmentation of ASG (5 points)

5
Q6) Given relation PAY as in the previous question, let p1: SAL < 30000 and p2: SAL > = 30000 be two
simple predicates. Perform a horizontal fragmentation of PAY with respect to these predicates to obtain
PAY1, and PAY2. Using the fragmentation of PAY, perform further derived horizontal fragmentation for
EMP. Show completeness, reconstruction, and disjointness of the fragmentation of EMP. (5 Point)

Q7) Let Q = {q1,….., q5} be a set of queries, A ={A1,……, A5} be a set of attributes, and S = {S1;S2;S3}
be a set of sites. The matrix of Figure (a) describes the attribute usage values and the matrix of Figure (b)
gives the application access frequencies. Assume that refi(qk) = 1 for all qk and Si and that A1 is the key
attribute. Calculate the attribute affinity matrix AA and count(A1, A4,A2). (10 Points)

Q8) Which of the following histories are conflict 6equivalent? And which are serializable? (5 Points)
H1 = {W2(x);W1(x);R3(x);R1(x);W2(y);R3(y);R3(z);R2(x)}
H2 = {R3(z);R3(y);W2(y);R2(z);W1(x);R3(x);W2(x);R1(x)}
H3 = {R3(z);W2(x);W2(y);R1(x);R3(x);R2(z);R3(y);W1(x)}
H4 = {R2(z);W2(x);W2(y);W1(x);R1(x);R3(x);R3(z);R3(y)}

With My Best Wishes


DR. Ahmed Elashry

You might also like