1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005.

Slides:



Advertisements
Similar presentations
Database Systems: Design, Implementation, and Management
Advertisements

Distributed DBMSs – Concepts and Design Chapter 22 in Textbook.
Enterprise Systems Distributed databases and systems - DT
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
Distributed databases
Transaction.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Chapter 13 (Web): Distributed Databases
Manajemen Basis Data Pertemuan 9 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008.
1 Minggu 12, Pertemuan 23 Introduction to Distributed DBMS (Chapter , 22.6, 3rd ed.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Distributed Database Management Systems
Overview Distributed vs. decentralized Why distributed databases
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Lecture-10 Distributed Database System A distributed database system consists of loosely.
Chapter 12 Distributed Database Management Systems
©Silberschatz, Korth and Sudarshan18.1Database System Concepts Centralized Systems Run on a single computer system and do not interact with other computer.
Definition of terms Definition of terms Explain business conditions driving distributed databases Explain business conditions driving distributed databases.
Distributed Databases
DISTRIBUTED DATABASE MANAGEMENT SYSTEM CHAPTER 07.
Distributed databases
DATABASE MANAGEMENT SYSTEMS 2 ANGELITO I. CUNANAN JR.
Distributed Databases
Distributed Database and Replication. Distributed Database A logically interrelated collection of shared data and a description of this data physically.
Distributed Databases and DBMSs: Concepts and Design
Distributed DBMSs - Concepts and Design Transparencies
1 Distributed and Parallel Databases. 2 Distributed Databases Distributed Systems goal: –to offer local DB autonomy at geographically distributed locations.
12 1 Chapter 12 Distributed Database Management Systems Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Distributed DBMSs - Concepts and Design Transparencies
Database Design – Lecture 16
III. Current Trends: 1 - Distributed DBMSsSlide 1/32 III. Current Trends Part 1: Distributed DBMSs: Concepts and Design Lecture 12 (2 hours) Lecturer:
ENTERPRISE PROGRAMMING
DISTRIBUTED DATABASES IN ADBMS Shilpa Seth
04/18/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
Session-9 Data Management for Decision Support
Distributed and mobile DBMSs Transparencies. ©Pearson Education 2009 Chapter 16 - Objectives Main concepts of distributed DBMSs (DDBMSs) Differences between.
Session-8 Data Management for Decision Support
10 1 Chapter 10 Distributed Database Management Systems Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 12 Distributed Database Management Systems.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 12 Distributed Database Management Systems.
Week 5 Lecture Distributed Database Management Systems Samuel ConnSamuel Conn, Asst Professor Suggestions for using the Lecture Slides.
Distributed systems and Distributed databases design Enterprise systems DT
Distributed Database Systems Overview
Multiprossesors Systems.. What are Distributed Databases ? “ A Logically interrelated collection of shared data ( and a description of this data) physically.
The Evolution of Distributed DBMS 4Social and Technical Changes in the 1980’s u Business operations became more decentralized geographically. u Competition.
DDBMS Distributed Database Management Systems Fragmentation
Distributed Databases DBMS Textbook, Chapter 22, Part II.
Distributed DBMSs- Concept and Design Jing Luo CS 157B Dr. Lee Fall, 2003.
Distributed Databases
ASMA AHMAD 28 TH APRIL, 2011 Database Systems Distributed Databases I.
1 Distributed Databases BUAD/American University Distributed Databases.
Databases Illuminated
Distributed Database. Introduction A major motivation behind the development of database systems is the desire to integrate the operational data of an.
Topic Distributed DBMS Database Management Systems Fall 2012 Presented by: Osama Ben Omran.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
Distributed Database Management Systems. Reading Textbook: Ch. 1, Ch. 3 Textbook: Ch. 1, Ch. 3 For next class: Ch. 4 For next class: Ch. 4 FarkasCSCE.
 Distributed Database Concepts  Parallel Vs Distributed Technology  Advantages  Additional Functions  Distribution Database Design  Data Fragmentation.
Distributed DBMS, Query Processing and Optimization
1 Lecture 10: Distributed Databases – Replication and Fragmentation Advanced Databases CG096 Nick Rossiter.
1 Lecture 8 Distributed Data Bases: Replication and Fragmentation.
1 Chapter 22 Distributed DBMS Concepts and Design CS 157B Edward Chen.
Chapter 24 Distributed DBMSs – Concepts and Design Pearson Education © 2014.
Distributed Database Design Bayu Adhi Tama, MTI Fasilkom-Unsri Adapted from Connolly, et al., Database Systems 4 th Edition, Pearson Education Limited,
1 Information Retrieval and Use De-normalisation and Distributed database systems Geoff Leese September 2008, revised October 2009.
Distributed DBMSs – Concepts and Design Chapter 24 in Textbook.
CMS Advanced Database and Client-Server Applications Distributed Databases slides by Martin Beer and Paul Crowther Connolly and Begg Chapter 22.
Distributed Databases
Distributed DBMSs - Concepts and Design
Distributed DBMS Concepts of Distributed DBMS
Distributed Databases
Chapter 19: Distributed Databases
Distributed Databases and DBMSs: Concepts and Design
Presentation transcript:

1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005

2 Chapter 22 - Objectives u Concepts. u Advantages and disadvantages of distributed databases. u Functions and architecture for a DDBMS. u Distributed database design. u Levels of transparency. © Pearson Education Limited 1995, 2005

3 Concepts Distributed Database A logically interrelated collection of shared data (and a description of this data), physically distributed over a computer network. Distributed DBMS Software system that permits the management of the distributed database and makes the distribution transparent to users. © Pearson Education Limited 1995, 2005

4 Concepts u Collection of logically-related shared data. u Data split into fragments. u Fragments may be replicated. u Fragments/replicas allocated to sites. u Sites linked by a communications network. u Data at each site is under control of a DBMS. u DBMSs handle local applications autonomously. u Each DBMS participates in at least one global application. © Pearson Education Limited 1995, 2005

5 Distributed DBMS © Pearson Education Limited 1995, 2005

6 Distributed Processing A centralized database that can be accessed over a computer network. © Pearson Education Limited 1995, 2005

7 Advantages of DDBMSs u Reflects organizational structure u Improved shareability and local autonomy u Improved availability u Improved reliability u Improved performance u Modular growth © Pearson Education Limited 1995, 2005

8 Disadvantages of DDBMSs u Complexity u Cost u Security u Integrity control more difficult u Lack of standards u Lack of experience u Database design more complex © Pearson Education Limited 1995, 2005

9 Types of DDBMS u Homogeneous DDBMS u Heterogeneous DDBMS © Pearson Education Limited 1995, 2005

10 Homogeneous DDBMS u All sites use same DBMS product. u Much easier to design and manage. u Approach provides incremental growth and allows increased performance. © Pearson Education Limited 1995, 2005

11 Heterogeneous DDBMS u Sites may run different DBMS products, with possibly different underlying data models. u Occurs when sites have implemented their own databases and integration is considered later. u Translations required to allow for: –Different hardware. –Different DBMS products. –Different hardware and different DBMS products. u Typical solution is to use gateways. © Pearson Education Limited 1995, 2005

12 Functions of a DBMS u Data Storage, Retrieval, and Update. u A User-Accessible Catalog. u Transaction Support. u Concurrency Control Services. u Recovery Services. © Pearson Education Limited 1995, 2005

13 Functions of a DBMS u Authorization Services. u Support for Data Communication. u Integrity Services. u Services to Promote Data Independence. u Utility Services. © Pearson Education Limited 1995, 2005

14 Functions of a DDBMS u Expect DDBMS to have at least the functionality of a DBMS. u Also to have the following functionality: –Extended communication services. –Extended Data Dictionary. –Distributed query processing. –Extended concurrency control. –Extended recovery services. © Pearson Education Limited 1995, 2005

15 Components of a DBMS © Pearson Education Limited 1995, 2005

16 Components of Database Manager (DM) © Pearson Education Limited 1995, 2005

17 Components of a DDBMS © Pearson Education Limited 1995, 2005

18 Distributed Database Design u Three key issues: –Fragmentation, –Allocation, –Replication. © Pearson Education Limited 1995, 2005

19 Distributed Database Design Fragmentation Relation may be divided into a number of sub- relations, which are then distributed. Allocation Each fragment is stored at site with “optimal” distribution. Replication Copy of fragment may be maintained at several sites. © Pearson Education Limited 1995, 2005

20 Data Allocation u Four alternative strategies regarding placement of data: –Centralized, –Partitioned (or Fragmented), –Complete Replication, –Selective Replication. © Pearson Education Limited 1995, 2005

21 Data Allocation Centralized: Consists of single database and DBMS stored at one site with users distributed across the network. Partitioned: Database partitioned into disjoint fragments, each fragment assigned to one site. Complete Replication: Consists of maintaining complete copy of database at each site. Selective Replication: Combination of partitioning, replication, and centralization. © Pearson Education Limited 1995, 2005

22 Why Fragment? u Usage –Applications work with views rather than entire relations. u Efficiency –Data is stored close to where it is most frequently used. –Data that is not needed by local applications is not stored. © Pearson Education Limited 1995, 2005

23 Why Fragment? u Parallelism –With fragments as unit of distribution, transaction can be divided into several sub- queries that operate on fragments. u Security –Data not required by local applications is not stored and so not available to unauthorized users. © Pearson Education Limited 1995, 2005

24 Why Fragment? u Disadvantages –Performance, –Integrity. © Pearson Education Limited 1995, 2005

25 Correctness of Fragmentation u Three correctness rules: –Completeness, –Reconstruction, –Disjointness. © Pearson Education Limited 1995, 2005

26 Correctness of Fragmentation Completeness If relation R is decomposed into fragments R 1, R 2,... R n, each data item that can be found in R must appear in at least one fragment. Reconstruction u Must be possible to define a relational operation that will reconstruct R from the fragments. u Reconstruction for horizontal fragmentation is Union operation and Join for vertical. © Pearson Education Limited 1995, 2005

27 Correctness of Fragmentation Disjointness u If data item d i appears in fragment R i, then it should not appear in any other fragment. u Exception: vertical fragmentation, where primary key attributes must be repeated to allow reconstruction. u For horizontal fragmentation, data item is a tuple. u For vertical fragmentation, data item is an attribute. © Pearson Education Limited 1995, 2005

28 Types of Fragmentation u Four types of fragmentation: –Horizontal, –Vertical, –Mixed, –Derived. u Other possibility is no fragmentation: –If relation is small and not updated frequently, may be better not to fragment relation. © Pearson Education Limited 1995, 2005

29 Horizontal and Vertical Fragmentation © Pearson Education Limited 1995, 2005

30 Mixed Fragmentation © Pearson Education Limited 1995, 2005

31 Horizontal Fragmentation u Consists of a subset of the tuples of a relation. u Defined using Selection operation of relational algebra:  p (R) u For example: P 1 =  type=‘House’ (PropertyForRent) P 2 =  type=‘Flat’ (PropertyForRent) © Pearson Education Limited 1995, 2005

32 Vertical Fragmentation u Consists of a subset of attributes of a relation. u Defined using Projection operation of relational algebra:  a1,...,an (R) u For example: S 1 =  staffNo, position, sex, DOB, salary (Staff) S 2 =  staffNo, fName, lName, branchNo (Staff) © Pearson Education Limited 1995, 2005

33 Mixed Fragmentation u Consists of a horizontal fragment that is vertically fragmented, or a vertical fragment that is horizontally fragmented. u Defined using Selection and Projection operations of relational algebra:  p (  a1,...,an (R)) or  a1,...,an (σ p (R)) © Pearson Education Limited 1995, 2005

34 Example - Mixed Fragmentation S 1 =  staffNo, position, sex, DOB, salary (Staff) S 2 =  staffNo, fName, lName, branchNo (Staff) S 21 =  branchNo=‘B003’ (S 2 ) S 22 =  branchNo=‘B005’ (S 2 ) S 23 =  branchNo=‘B007’ (S 2 ) © Pearson Education Limited 1995, 2005

35 Derived Horizontal Fragmentation u A horizontal fragment that is based on horizontal fragmentation of a parent relation. u Ensures that fragments that are frequently joined together are at same site. u Defined using Semi-Join operation of relational algebra: R i = R F S i,1  i  w © Pearson Education Limited 1995, 2005

36 Example - Derived Horizontal Fragmentation S 3 =  branchNo=‘B003’ (Staff) S 4 =  branchNo=‘B005’ (Staff) S 5 =  branchNo=‘B007’ (Staff) Could use derived fragmentation for Property: P i = PropertyForRent branchNo S i,3  i  5 © Pearson Education Limited 1995, 2005

37 Derived Horizontal Fragmentation u If relation contains more than one foreign key, need to select one as parent. u Choice can be based on fragmentation used most frequently or fragmentation with better join characteristics. © Pearson Education Limited 1995, 2005

38 Transparencies in a DDBMS u Distribution Transparency –Fragmentation Transparency –Location Transparency –Replication Transparency –Local Mapping Transparency –Naming Transparency © Pearson Education Limited 1995, 2005

39 Transparencies in a DDBMS u Transaction Transparency –Concurrency Transparency –Failure Transparency u Performance Transparency u DBMS Transparency © Pearson Education Limited 1995, 2005

40 Distribution Transparency u Distribution transparency allows user to perceive database as single, logical entity. u If DDBMS exhibits distribution transparency, user does not need to know: –data is fragmented (fragmentation transparency), –location of data items (location transparency), –otherwise call this local mapping transparency. u With replication transparency, user is unaware of replication of fragments. © Pearson Education Limited 1995, 2005

41 Naming Transparency u Each item in a DDB must have a unique name. u DDBMS must ensure that no two sites create a database object with same name. u One solution is to create central name server. u Alternative solution: prefix object with identifier of site that created it. © Pearson Education Limited 1995, 2005

42 Transaction Transparency u Ensures that all distributed transactions maintain distributed database’s integrity and consistency. u Distributed transaction accesses data stored at more than one location. u Each transaction is divided into number of sub- transactions, one for each site that has to be accessed. u DDBMS must ensure the indivisibility of both the global transaction and each of the sub-transactions. © Pearson Education Limited 1995, 2005

43 Example - Distributed Transaction u T prints out names of all staff. Define three sub- transactions T S3, T S5, and T S7 to represent agents at sites 3, 5, and 7. © Pearson Education Limited 1995, 2005

44 Concurrency Transparency u All transactions must execute independently and be logically consistent with results obtained if transactions executed one at a time, in some arbitrary serial order. u Same fundamental principles as for centralized DBMS. u DDBMS must ensure both global and local transactions do not interfere with each other. u Similarly, DDBMS must ensure consistency of all sub-transactions of global transaction. © Pearson Education Limited 1995, 2005

45 Concurrency Transparency u Replication makes concurrency more complex. u If a copy of a replicated data item is updated, update must be propagated to all copies. u Could propagate changes as part of original transaction, making it an atomic operation. u However, if one site holding copy is not reachable, then transaction is delayed until site is reachable. © Pearson Education Limited 1995, 2005

46 Concurrency Transparency u Could limit update propagation to only those sites currently available. Remaining sites updated when they become available again. u Could allow updates to copies to happen asynchronously, sometime after the original update. Delay in regaining consistency may range from a few seconds to several hours. © Pearson Education Limited 1995, 2005

47 Failure Transparency u DDBMS must ensure atomicity and durability of global transaction. u Means ensuring that sub-transactions of global transaction either all commit or all abort. u Thus, DDBMS must synchronize global transaction to ensure that all sub-transactions have completed successfully before recording a final COMMIT for global transaction. u Must do this in presence of site and network failures. © Pearson Education Limited 1995, 2005

48 Performance Transparency u DDBMS must perform as if it were a centralized DBMS. –DDBMS should not suffer any performance degradation due to distributed architecture. –DDBMS should determine most cost-effective strategy to execute a request. © Pearson Education Limited 1995, 2005

49 Performance Transparency u Distributed Query Processor (DQP) maps data request into ordered sequence of operations on local databases. u Must consider fragmentation, replication, and allocation schemas. u DQP has to decide: –which fragment to access; –which copy of a fragment to use; –which location to use. © Pearson Education Limited 1995, 2005

50 Performance Transparency u DQP produces execution strategy optimized with respect to some cost function. u Typically, costs associated with a distributed request include: –I/O cost; –CPU cost; –communication cost. © Pearson Education Limited 1995, 2005

51 Classification of Transactions u In IBM’s Distributed Relational Database Architecture (DRDA), four types of transactions: –Remote request –Remote unit of work –Distributed unit of work –Distributed request. © Pearson Education Limited 1995, 2005

52 Classification of Transactions © Pearson Education Limited 1995, 2005