Presentation on theme: "1 Database Systems: Design, Implementation, and Management CHAPTER 10 Distributed Database Management System."— Presentation transcript:
1 Database Systems: Design, Implementation, and Management CHAPTER 10 Distributed Database Management System
2 Chapter Objectives 4 Understand concepts of distributed DBMS 4 Understand various transparency features of distributed databases 4 Understand distributed database design issues
3 What Is A Distributed DBMS? l Decentralization of business operations and globalization of businesses created a demand for distributing the data and processes across multiple locations. l Distributed database management systems (DDBMS) are designed to meet the information requirements of such multi-location organizations. l A DDBMS manages the storage and processing of logically related data over interconnected computer systems in which both data and processing functions are distributed among several sites. l Distributed processing shares the databases logical processing among two or more physically independent sites that are connected through a network.
4 DDBMS Advantages l Data located near site with greatest demand l Faster data access l Faster data processing l Growth facilitation l Improved communications l Reduced operating costs l User-friendly interface l Less danger of single-point failure l Processor independence
5 DDBMS Disadvantages l Complexity of management and control l Security l Lack of standards l Increased storage requirements l Greater difficulty in managing data environment l Increased training costs
7 Distributed Database l Distributed database stores a logically related database over two or more physically independent sites connected via a computer network.
8 Distributed Database Stores logically related database over physically independent sites Figure 10.2
9 Distributed Database vs. Distributed Processing l Distributed processing u Does not require distributed database u May be based on a single database on single computer u Copies or parts of database processing functions must be distributed to all data storage sites l Distributed database u Requires distributed processing l Both u Require a network to connect components
10 Functions of DDBMS l Application/end user interface l Validation to analyze data requests l Transformation to determine request components l Query optimization to find the best access strategy l Mapping to determine the data location l I/O interface to read or write data l Formatting to prepare the data for presentation l Security to provide data privacy l Backup and recovery l DB Administration l Concurrency Control l Transaction Management
11 What Is A Distributed DBMS? Figure 10.3 Centralized Database Management System
12 What Is A Distributed DBMS? Figure 10.4 Fully Distributed Database Management System
13 DDBMS Components l Computer workstations that form the network system. l Network hardware and software components that reside in each workstation. l Communications media that carry the data from one workstation to another. l Transaction processor (TP) receives and processes the applications data requests. l Data processor (DP) stores and retrieves data located at the site. Also known as data manager (DM).
14 Distributed Database Components Figure 10.5
15 Levels of Data & Process Distribution l Depending on the levels of data and process distribution we can envisage three different configurations: u SPSD: Single site process, single site data (Centralized) u MPSD: Multiple site processing, single site data u MPMD: Multiple site processing, multiple site data (Fully distributed) u SPMD: Single site processing, multiple site data (Logically unsound)
16 Levels of Data & Process Distribution l Single-Site Processing, Single-Site Data (SPSD) u All processing is done on a single CPU or host computer. u All data are stored on the host computers local disk. u The DBMS is located on the host computer. u The DBMS is accessed by dumb terminals. u This is an example of a centralized DBMS
17 Levels of Data & Process Distribution Figure 10.6 Nondistributed (Centralized) DBMS
18 Levels of Data & Process Distribution l Multiple-Site Processing, Single-Site Data (MPSD) u Typically, MPSD requires a network file server on which conventional applications are accessed through a LAN. u A popular variation of the MPSD approach is known as a client/server architecture.
19 Levels of Data & Process Distribution Figure 10.7 Multiple-Site Processing, Single-Site Data
20 Levels of Data & Process Distribution l Multiple-Site Processing, Multiple-Site Data (MPMD) u Fully distributed DBMS with support for multiple DPs and TPs at multiple sites. l Homogeneous DDBMS integrate only one type of centralized DBMS over the network. l Heterogeneous DDBMS integrate different types of centralized DBMSs over a network.
21 Distributed DB Transparency l A DDBMS ensures that the database operations are transparent to the end user. l Different types of transparencies are: u Distribution transparency u Transaction transparency u Failure transparency u Performance transparency u Heterogeneity transparency
22 Distribution Transparency l Distribution transparency allows us to manage a physically dispersed database as though it were a centralized database. l Three Levels of Distribution Transparency u Fragmentation transparency u Location transparency u Local mapping transparency
23 Distribution Transparency l Example: Employee data (EMPLOYEE) are distributed over three locations: New York, Atlanta, and Miami. Depending on the level of distribution transparency support, three different cases of queries are possible: Distributed DBMS Employee Table E1E2E3Fragment Location New York AtlantaMiami
24 Distribution Transparency l When a DBMS support fragmentation transparency the user views a single logical database u SELECT * FROM EMPLOYEE WHERE SALARY > 50000;
25 Distribution Transparency l When the DBMS supports location transparency the user needs to know the fragment names but need not know the actual location of the fragments u SELECT * FROM E1 WHERE SALARY > UNION SELECT * FROM E2 WHERE SALARY > UNION SELECT * FROM E3 WHERE SALARY > 50000;
26 Distribution Transparency l When the DBMS supports local mapping transparency the user needs to know the fragment names as well as the actual location of the fragments u SELECT * FROM E1 NODE NY WHERE SALARY > UNION SELECT * FROM E2 NODE ATL WHERE SALARY > UNION SELECT * FROM E3 NODE MIA WHERE SALARY > 50000;
27 Distribution Transparency l Distribution transparency is supported by a distributed data dictionary which captures the distributed global schema. l A local transaction processor uses this global schema to translate user requests into subqueries (remote requests) that will be processed by different data processors.
28 Transaction Transparency l A distributed transaction updates and/or requests data from multiple remote sites. l Transaction transparency ensures that the transaction will be completed only if all database sites involved in the transaction complete their part of the transaction. l It maintains database integrity of a distributed database. l Giving a 5% raise to all employees in the previous example involves updating the database at multiple locations. If the transaction cannot be committed in one location, it must be rolled back in all locations.
29 Distributed DB Transparency l Failure Transparency ensures that failure of a node will not affect the operation of a DDBMS l Performance Transparency ensures that the system performance will not degrade because of the distributed nature of the database. u Query optimization becomes very complex in a distributed database due to fragmentation and replication of data in multiple remote nodes. l Heterogeneity Transparency allows the integration of different types of DBMSs (multi vendor, multi model) under a common global schema. l The DDBMS transparently translates the user requests from one local schema to another.
30 Distributed Database Design l All design principles and concepts discussed in the context of a centralized database also apply to a distributed database. l Three additional issues are relevant to the design of a distributed database: u data fragmentation u data replication u data allocation
31 Data Fragmentation l Data fragmentation allows us to break a single object (a database or a table) into two or more fragments. l Three type of fragmentation strategies are available to distribute a table:Horizontal, Vertical, Mixed. l Horizontal fragmentation divides a table into fragments consisting of sets of tuples u Each fragment has unique rows and is stored at a different node u Example: A bank may distribute its customer table by location
32 Data Fragmentation l Vertical fragmentation divides a table into fragments consisting of sets of columns u Each fragment is located at a different node and consists of unique columns - with the exception of the primary key column, which is common to all fragments u Example: The Customer table may be divided into two fragments, one fragment consisting of Cust ID, name, and address may be located in the Service building and the other fragment with Cust ID, credit limit, balance, dues may be located in the Collection building.
33 Data Fragmentation l Mixed fragmentation combines the horizontal and vertical strategies. l A fragment may consist of a subset of rows and a subset of columns of the original table. l Example: Customer table may be divided by state and grouped by columns. The service building in Texas will store Customer service related information for customers from Texas.
34 Data Replication l Data replication involves storing multiple copies of a fragment in different locations. For example, a copy may be stored in New York and another in San Francisco. l It improves response time and data availability. l Data replication requires the DDBMS to maintain data consistency among the replicas. l A fully replicated database stores multiple copies of each database fragment. l A partially replicated database stores multiple copies of some database fragments at multiple sites.
35 Data Allocation l Data allocation decision involves determining the location of the fragments so as to achieve the design goals of cost, response time and availability. l Three data allocation strategies are: centralized, partitioned and replicated. l A centralized allocation strategy stores the entire database in a single location. l A partitioned strategy divides the database into disjointed parts (fragments) and allocates the fragments to different locations. l In a replicated strategy copies of one or more database fragments are stored at several sites.