ASMA AHMAD 28 TH APRIL, 2011 Database Systems Distributed Databases I.

Slides:



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

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 Distributed Transactions Transaction may access data at several sites. Each site has a local.
©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
DATABASE MANAGEMENT SYSTEMS 2 ANGELITO I. CUNANAN JR.
Distributed Databases
Distributed Databases and DBMSs: Concepts and Design
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:
04/18/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
DISTRIBUTED DATABASE SYSTEM.  A distributed database system consists of loosely coupled sites that share no physical component  Database systems that.
1 Distributed Data Management Distributed Systems Department of Computer Science UC Irvine.
Session-9 Data Management for Decision Support
©Silberschatz, Korth and Sudarshan19.1Database System Concepts 1 Chapter 19: Distributed Databases Heterogeneous and Homogeneous Databases Distributed.
Session-8 Data Management for Decision Support
Lecture 16- Distributed Databases Advanced Databases Masood Niazi Torshiz Islamic Azad University- Mashhad Branch
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 Databases Reference Books: An introduction to Database Systems - By C.J. Database Systems and Concepts – Silberchatz, Korth and Sudarshan Lecture.
Distributed Database Systems Overview
A/18-849B/95-811A/19-729A Internet-Scale Sensor Systems: Design and Policy Lecture 7 Part 1. Distributed Databases Part 2. IrisNet Query Processing.
Multiprossesors Systems.. What are Distributed Databases ? “ A Logically interrelated collection of shared data ( and a description of this data) physically.
Distributed DBMSs- Concept and Design Jing Luo CS 157B Dr. Lee Fall, 2003.
Kjell Orsborn UU - DIS - UDBL DATABASE SYSTEMS - 10p Course No. 2AD235 Spring 2002 A second course on development of database systems Kjell.
Distributed Databases
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.
Distributed database system
Topic Distributed DBMS Database Management Systems Fall 2012 Presented by: Osama Ben Omran.
Chapter 19 Distributed Databases. 2 Distributed Database System n A distributed DBS consists of loosely coupled sites that share no physical component.
19.1Database System Concepts - 6 th Edition Chapter 19: Distributed Databases Heterogeneous and Homogeneous Databases Distributed Data Storage Distributed.
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.
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.
Topics in Distributed Databases Database System Implementation CSE 507 Some slides adapted from Navathe et. Al and Silberchatz et. Al.
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
1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 22: Distributed.
Distributed Databases “Fundamentals”
Distributed Database Concepts
Database System Implementation CSE 507
Chapter 19: Distributed Databases
Commit Protocols CS60002: Distributed Systems
Distributed Databases and DBMSs: Concepts and Design
Database System Architectures
Presentation transcript:

ASMA AHMAD 28 TH APRIL, 2011 Database Systems Distributed Databases I

Distributed Database Systems 2 A distributed database is a collection of multiple logically interrelated databases distributed over the computer network A distributed database management system as a software system that manages a distributed database while making distribution transparent to the user Collection of logically related shared data Database system that run on each site are independent of each other Transactions may access data at one or more sites

Distributed DBMS 3

Distributed Processing 4 A centralized database that can be accessed over a computer network. This is not a DDBMS

Parallel DBMS 5 A DBMS running across multiple processors and disks designed to execute operations in parallel, whenever possible, to improve performance. Based on premise that single processor systems can no longer meet requirements for cost-effective scalability, reliability, and performance. Parallel DBMSs link multiple, smaller machines to achieve same throughput as single, larger machine, with greater scalability and reliability. Parallel DBMS isn’t necessarily a DDBMS

Parallel DBMS 6 Main architectures for parallel DBMSs are:  Shared memory,  Shared disk,  Shared nothing.

Parallel DBMS 7 (a) shared memory/disk (b) shared disk (c) shared nothing

Advantages of DDBMSs 8 Reflects organizational structure Improved shareability and local autonomy Improved availability Improved reliability Improved performance

Disadvantages of DDBMSs 9 Complexity Cost Security Integrity control more difficult Lack of standards Lack of experience Database design more complex

Homogeneous Vs Hetrogeneous 10 In a homogeneous distributed database  All sites have identical software  Are aware of each other and agree to cooperate in processing user requests.  Each site surrenders part of its autonomy in terms of right to change schemas or software  Appears to user as a single system In a heterogeneous distributed database  Different sites may use different schemas and software  Difference in schema is a major problem for query processing  Difference in software is a major problem for transaction processing  Sites may not be aware of each other and may provide only limited facilities for cooperation in transaction processing

Distributed Data Storage Assume relational data model Replication  System maintains multiple copies of data, stored in different sites, for faster retrieval and fault tolerance. Fragmentation  Relation is partitioned into several fragments stored in distinct sites Replication and fragmentation can be combined  Relation is partitioned into several fragments: system maintains several identical replicas of each such fragment. 11

n A relation or fragment of a relation is replicated if it is stored redundantly in two or more sites. n Full replication of a relation is the case where the relation is stored at all sites. n Fully redundant databases are those in which every site contains a copy of the entire database. Data Replication Distributed Data Storage 12

Data Replication (Cont.) Advantages of Replication  Availability: failure of site containing relation r does not result in unavailability of r is replicas exist.  Parallelism: queries on r may be processed by several nodes in parallel.  Reduced data transfer: relation r is available locally at each site containing a replica of r. 13

Disadvantages of Replication  Increased cost of updates: each replica of relation r must be updated.  Increased complexity of concurrency control: concurrent updates to distinct replicas may lead to inconsistent data unless special concurrency control mechanisms are implemented. Data Replication (Cont.) 14

Data Fragmentation Division of relation r into fragments r 1, r 2, …, r n which contain sufficient information to reconstruct relation r. Horizontal fragmentation: each tuple of r is assigned to one or more fragments Vertical fragmentation: the schema for relation r is split into several smaller schemas  All schemas must contain a common candidate key (or superkey) to ensure lossless join property.  A special attribute, the tuple-id attribute may be added to each schema to serve as a candidate key. Example : relation account with following schema Account-schema = (branch-name, account-number, balance) 15

Horizontal Fragmentation of account Relation branch-nameaccount-numberbalance Hillside A-305 A-226 A account 1 =  branch-name=“Hillside” (account) branch-nameaccount-numberbalance Valleyview A-177 A-402 A-408 A account 2 =  branch-name=“Valleyview” (account) 16

Vertical Fragmentation of employee-info Relation branch-name customer-name tuple-id Hillside Valleyview Hillside Valleyview Lowman Camp Kahn Green deposit 1 =  branch-name, customer-name, tuple-id (employee-info) account number balance tuple-id A-305 A-226 A-177 A-402 A-155 A-408 A-639 deposit 2 =  account-number, balance, tuple-id (employee-info) 17

Advantages of Fragmentation Horizontal:  allows parallel processing on fragments of a relation  allows a relation to be split so that tuples are located where they are most frequently accessed  Campus specific queries Vertical:  allows tuples to be split so that each part of the tuple is stored where it is most frequently accessed  tuple-id attribute allows efficient joining of vertical fragments  allows parallel processing on a relation Vertical and horizontal fragmentation can be mixed.  Fragments may be successively fragmented to an arbitrary depth. 18

Data Transparency Data transparency: Degree to which system user may remain unaware of the details of how and where the data items are stored in a distributed system Consider transparency issues in relation to:  Fragmentation transparency  Replication transparency  Location transparency Naming of Data Items - Criteria 1. Every data item must have a system-wide unique name. 2. It should be possible to find the location of data items efficiently. 3. It should be possible to change the location of data items transparently. 4. Each site should be able to create new data items autonomously. 19

Centralized Scheme - Name Server Structure:  name server assigns all names  each site maintains a record of local data items  sites ask name server to locate non-local data items Advantages:  satisfies naming criteria 1-3 Disadvantages:  does not satisfy naming criterion 4  name server is a potential performance bottleneck  name server is a single point of failure 20

Use of Aliases Alternative to centralized scheme: each site prefixes its own site identifier to any name that it generates i.e., site 17.account.  Fulfills having a unique identifier, and avoids problems associated with central control.  However, fails to achieve network transparency. Solution: Create a set of aliases for data items; Store the mapping of aliases to the real names at each site. The user can be unaware of the physical location of a data item, and is unaffected if the data item is moved from one site to another. 21

Distributed Transactions Transaction may access data at several sites. Each site has a local transaction manager responsible for:  Maintaining a log for recovery purposes  Participating in coordinating the concurrent execution of the transactions executing at that site. Each site has a transaction coordinator, which is responsible for:  Starting the execution of transactions that originate at the site.  Distributing subtransactions at appropriate sites for execution.  Coordinating the termination of each transaction that originates at the site, which may result in the transaction being committed at all sites or aborted at all sites. 22

Transaction System Architecture 23

Commit Protocols Commit protocols are used to ensure atomicity across sites  a transaction which executes at multiple sites must either be committed at all the sites, or aborted at all the sites.  not acceptable to have a transaction committed at one site and aborted at another The two-phase commit (2 PC) protocol is widely used The three-phase commit (3 PC) protocol is more complicated and more expensive, but avoids some drawbacks of two-phase commit protocol. 24

System Failure Modes Failures unique to distributed systems:  Failure of a site.  Loss of massages  Handled by network transmission control protocols such as TCP-IP  Failure of a communication link  Handled by network protocols, by routing messages via alternative links  Network partition  A network is said to be partitioned when it has been split into two or more subsystems that lack any connection between them Note: a subsystem may consist of a single node Network partitioning and site failures are generally indistinguishable. 25

Distributed Database Design 26 Three key issues:  Fragmentation,  Allocation,  Replication.

Distributed Database Design 27 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.

Fragmentation 28 Definition and allocation of fragments carried out strategically to achieve:  Locality of Reference.  Improved Reliability and Availability.  Improved Performance.  Balanced Storage Capacities and Costs.  Minimal Communication Costs. Involves analyzing most important applications, based on quantitative/qualitative information.

Fragmentation 29 Quantitative information may include:  frequency with which an application is run;  site from which an application is run;  performance criteria for transactions and applications. Qualitative information may include transactions that are executed by application, type of access (read or write), and predicates of read operations.

Data Allocation 30 Four alternative strategies regarding placement of data:  Centralized,  Partitioned (or Fragmented),  Complete Replication,  Selective Replication.

Data Allocation 31 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.

Data Allocation 32 Complete Replication Consists of maintaining complete copy of database at each site. Selective Replication Combination of partitioning, replication, and centralization.

Comparison of Strategies for Data Distribution 33

Open Database Access and Interoperability 34 Open Group has formed a Working Group to provide specifications that will create database infrastructure environment where there is:  Common SQL API that allows client applications to be written that do not need to know vendor of DBMS they are accessing.  Common database protocol that enables DBMS from one vendor to communicate directly with DBMS from another vendor without the need for a gateway.

Open Database Access and Interoperability 35  A common network protocol that allows communications between different DBMSs. Most ambitious goal is to find a way to enable transaction to span DBMSs from different vendors without use of a gateway.