Download presentation
Presentation is loading. Please wait.
Published byBaldric Mills Modified over 9 years ago
1
PMIT-6101 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University
2
Lecture 07 Distributed Database Design
3
Outline Distributed Database Design Distributed Design Issues o Data Allocation Model Slide 3
4
A vertical fragmentation of a relation R produces fragments R 1, R 2,…. R r, each of which contains a subset of R’s attributes as well as the primary key of R. The objective of vertical fragmentation is to partition a relation into a set of smaller relations so that many of the user applications will run on only one fragment. In this context, an “optimal” fragmentation is one that produces a fragmentation scheme which minimizes the execution time of user applications that run on these fragments. Vertical Fragmentation Slide 4
5
More difficult than horizontal, because more alternatives exist. Example: In horizontal partitioning, if the total number of simple predicates in Pr is n, there are 2 n possible minterm predicates that can be defined on it. some of these will contradict the existing implications, further reducing the candidate fragments that need to be considered In the case of vertical partitioning if a relation has m non- primary key attributes, the number of possible fragments is equal to B(m), which is the mth Bell number. For large values of m;B(m)= approximately (m m ) for m=10, B(m) =115,000, for m=15, B(m) =10 9, for m=30, B(m) = 10 23 Vertical Fragmentation Slide 5
6
Two types of heuristic approaches exist for the vertical fragmentation of global relations: Grouping: starts by assigning each attribute to one fragment, and at each step, joins some of the fragments until some criteria is satisfied. Grouping was first suggested for centralized databases [Hammer and Niamir, 1979], and was used later for distributed databases [Sacca and Wiederhold, 1985]. Splitting: starts with a relation and decides on beneficial partitionings based on the access behavior of applications to the attributes. The technique was also first discussed for centralized database design [Hoffer and Severance,1975]. It was then extended to the distributed environment [Navathe et al.,1984]. Slide 6 Vertical Fragmentation
7
In most cases a simple horizontal or vertical fragmentation of a database schema will not be sufficient to satisfy the requirements of user applications. In this case a vertical fragmentation may be followed by a horizontal one, or vice versa, producing a tree structured Partitioning. Since the two types of partitioning strategies are applied one after the other, this alternative is called hybrid fragmentation. It has also been named mixed fragmentation or nested fragmentation. Slide 7 Hybrid Fragmentation
8
R HF R1R1 VF R 11 R 12 R 21 R 22 R 23 R2R2 It is also called mixed fragmentation or nested fragmentation. Slide 8
9
To reconstruct the original global relation in case of hybrid fragmentation, one starts at the leaves of the partitioning tree and moves upward by performing joins and unions. The fragmentation is complete if the intermediate and leaf fragments are complete. Similarly, disjointness is guaranteed if intermediate and leaf fragments are disjoint. Slide 9 Correctness of Hybrid Fragmentation
10
Allocation Allocation Problem Given F = {F 1, F 2, …, F n } fragments S ={S 1, S 2, …, S m } network sites on which a set of applications Q = {q 1, q 2,…, q q } is running. The allocation problem involves finding the “optimal” distribution of F to S. Optimality can be defined with respect to two measures: Minimal cost o The cost function consists of the cost of storing each Fi at a site Sj, o the cost of querying Fi at site Sj, the cost of updating Fi at all sites where it is stored, o the cost of data communication. Performance o minimize the response time. o maximize the system throughput at each site. Slide 10
11
General Form min(Total Cost) subject to response time constraint storage constraint processing constraint Decision Variable Allocation Model x ij 1 if fragment F i is stored at site S j 0 otherwise Slide 11
12
Total Cost Storage Cost (of fragment F j at S k ) We choose a different approach in our model of the database allocation problem (DAP) and specify it as consisting of the processing cost (PC) and the transmission cost (TC). Thus the query processing cost (QPC) for application qi is: processing component + transmission component Allocation Model (unit storage cost at S k ) (size of F j ) x jk query processing cost all queries cost of storing a fragment at a site all fragments all sites Slide 12
13
Allocation Model Query Processing Cost Processing component PC, consists of three cost factors the access cost (AC) + the integrity enforcement cost (IE) + the concurrency control cost (CC) Access cost o The first two terms calculate the number of accesses of user query qi to fragment Fj. o We assume that the local costs of processing them are identical. o The summation gives the total number of accesses for all the fragments referenced by qi. Multiplication by LPC k gives the cost of this access at site S k. o We again use x ij to select only those cost values for the sites where fragments are stored. Integrity enforcement and concurrency control costs o Can be similarly calculated (no. of update accesses+ no. of read accesses) all fragments all sites x ij local processing cost at a site Slide 13
14
Query Processing Cost Transmission component cost of processing updates + cost of processing retrievals In update queries it is necessary to inform all the sites where replicas exist, while in retrieval queries, it is sufficient to access only one of the copies. In addition, at the end of an update request, there is no data transmission back to the originating site other than a confirmation message, whereas the retrieval-only queries may result in significant data transmission. Cost of updates Retrieval Cost Allocation Model update message cost all fragments all sites acknowledgment cost all fragments all sites min all sites all fragments (cost of retrieval command cost of sending back the result) Slide 14
15
Allocation Model Constraints Response Time execution time of query ≤ max. allowable response time for that query Storage Constraint (for a site) Processing constraint (for a site) storage requirement of a fragment at that site all fragments storage capacity at that site processing load of a query at that site all queries processing capacity of that site Slide 15
16
Solved Problem Slide 16
17
Slide 17 Solved Problem
18
Sample Questions Lecture – 1: Q-1: What is the distributed Database? Q-2: What is not distributed Database? Q-3: Problems area and Disadvantages of Distributed Database System? Q-4: Distributed Database reality or Real view of Distributed DBMS? Q-5: Implicit assumptions, application and Promises of Distributed Database Management system? Q-6: Network Transparency, Replication Transparency, Data independence? Q-7: Network Transparency Location Transparency Naming Transparency (Slide 32, 33)? Q-8: Logical Data Independency, Physical Data Independency? Q-9: Fully Transparent Access (slide 28, Lec-1)? Q-10: Improve Performance, Reliability of distributed Database (slide 38, 39)? Q-11: What is being distributed? Q-12 What do you mean by distributed processing system? Slide 18
19
Lecture 2 – 3: Normalization (all slides) Relational Algebra (only algebra) Lecture -4: Reasons for Fragmentation Slides, 6, 7, 9, 10 Lecture -5: Degree of Fragmentation Slides 4, 5, 6, 7 Comparisons of Relocation Alternatives (Slide 9) Database Information (Slide 13) Application Information (Slide 17, 18, 19) Algorithm (Slides 25, 26, 27, 28, 29) Example solving (Slides 34, 38) Lecture -6+7: Important aspect or desirable property of simple predicates: Slides 7, 8, 10, 11, 12, 13, 14, 16, 22-25 Problems solving (Slides 18, 19, 20) Slides: 33-37(Allocation Model) Slide 19 Sample Questions
20
Thank You Slide 20
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.