Beruflich Dokumente
Kultur Dokumente
4. Distributed DBMS Architecture 5. Distributed Database Design 7.5 Layers of Query Processing
Preethi Vishwanath
ANSI/SPARC Architecture
External View, which is that of the user, who might be a programmer basically concerned with how users view the data. Conceptual view, that of the enterprise Internal View, that of a system or a machine, deals with the physical definition and organization of data.
Users
External View
Conceptual View
Internal View
Alternatives to autonomy
Tight Integration Single image of entire db_ Is available for any user who wants to share the info, which may reside in multiple db_. Semiautonomous systems Consists of DBMSs that can operate independently, but have decided to participate in a federation. Total Isolation Stand Alone DBMs
Distribution
Deals with Physical distribution of data over multiple sites Three alternative architectures available
Client-Server, communication duties are shared between the client machines and servers. Peer-to-peer systems, no distinction of client machines versus servers. Non-distributed systems
Heterogeneity
Occurs in Various forms Data models: Representing data with different modeling tools Query Languages: Not only involves the use of completely different data access paradigms in different data models, but also covers difference in languages, even when the individual systems use the same data model.
Client-Server architecture
Distinguish the functionality and divide these functions into two classes, server functions and client functions. Server does most of the data management work
query processing data management Optimization Transaction management etc
1.
Client performs
Application User interface DBMS Client model
2.
Data processor
Local query optimizer
Acts as the access path selector Responsible for choosing the best access path
MDBS Architecture
Models Using a Global Conceptual Schema
GCS is defined by integrating either the external schemas of local autonomous databases or parts of their local conceptual schema Users of a local DBMS define their own views on the local database. If heterogeneity exists in the system, then two implementation alternatives exist: unilingual and multilingual Unilingual requires the users to utilize possibly different data models and languages Basic philosophy of multilingual architecture, is to permit each user to access the global database.
GCS in multi-DBMS Mapping is from local conceptual schema to a global schema Bottom-up design
Dynamic
Most of the real life applications are dynamic
Partial information
Deviations from predictions
Bottom-Up Approach
Suitable for applications where database already exists Starting point is individual conceptual schemas Exists primarily in the context of heterogeneous database.
Fragmentation
Advantages
1.
Disadvantages
1. Applications whose views are
2.
defined on more than one fragment may suffer performance degradation, if applications have conflicting requirements.
2. Simple asks like checking for
3.
4.
Id
100 200 300
Name
A B C
Sal
10K 20K 30K
Dept
D1 D2 D3
Horizontal Fragmentation
Vertical Fragmentation
Id 300
Name C
Sal 30K
Dept D3
300
Reconstruction
If a relation R is decomposed into fragments R1,R2 . Rn, it should be possible to define a relational operator such that R = Ri, Ri FR , Please note the operator would be different for the different forms of fragmentation
Disjointness
If a relation R is horizontally decomposed into fragments R1,R2 . Rn, and data item di is in Rj, it is not in any other fragment Rk (k != j).
Emp
Id 100 200 300 Name A B C Dept D1 D2 D3 Dept D1 D2 D3
PAY
Sal 10K 20K 30K
PAY1 = EMP1 PAY PAY2 = EMP2 PAY Emp1 = Sal <= 20K (Emp) Emp2 = Sal > 20K (Emp) PAY1Name Id
100 200 A B Dept D1 D2
PAY2
Id 300 Name C Dept D3
Vertical Fragmentation
Grouping Starts by assigning each attribute to one fragment
At each step, joins some of the fragments until some criteria is satisfied.
Results in overlapping fragments
Splitting
Starts with a relation and decides on beneficial partitioning based on the access behavior of applications to the attributes
Hybrid Fragmentation
Horizontal or vertical fragmentation of a database schema will not be sufficient to satisfy the requirements of user applications. In certain cases, a vertical fragmentation may be followed by a horizontal one, or vice versa. Since two types of partitioning strategies are applied one after the other, this alternative is called hybrid fragmentation. In case of horizontal fragmentation, one has to stop when each fragment consists of only one tuple, whereas the termination point for vertical fragmentation is one attribute per fragment. Example discussed in slides 20 and 26 can be converted into hybrid fragmentation
U R R1 R2
R11
R12
R21 R22
R23
R11
R12
R21
R22
R23