Distributed systems and Distributed databases design Enterprise systems DT211 4 1.

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.
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 Databases Logical next step in geographically dispersed organisations goal is to provide location transparency starting point = a set of decentralised.
Distributed Database Management Systems
Chapter 9 : Distributed Database.
Overview Distributed vs. decentralized Why distributed databases
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 databases
Alexandria Dodd Janelle Toungett
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
04/18/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
CORE 2: Information systems and Databases CENTRALISED AND DISTRIBUTED DATABASES.
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.
Massively Distributed Database Systems - Distributed DBS Spring 2014 Ki-Joune Li Pusan National University.
Session-8 Data Management for Decision Support
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 Database Systems Overview
10 1 Chapter 10 Distributed Database Management Systems Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Multiprossesors Systems.. What are Distributed Databases ? “ A Logically interrelated collection of shared data ( and a description of this data) physically.
DDBMS Distributed Database Management Systems Fragmentation
Distributed DBMSs- Concept and Design Jing Luo CS 157B Dr. Lee Fall, 2003.
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.
PMIT-6101 Advanced Database Systems By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
CS338Parallel and Distributed Databases11-1 Parallel and Distributed Databases Lecture Topics Multi-CPU and distributed systems Monolithic system Client–server.
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.
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.
1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005.
Distributed DBMSs - Concepts and Design
Distributed Databases
Chapter 19: Distributed Databases
Distributed Databases and DBMSs: Concepts and Design
Presentation transcript:

Distributed systems and Distributed databases design Enterprise systems DT

A distributed system is a collection of computers that communicate by means of some networked media. There are a number of key issues which must be considered when discussing distributed system architectures: 1.The principle of locality. This means that parts of a system which are associated with each other should be in close proximity: ideally, be on the same computer or, less ideally, the same local area network. 2.The principle of sharing. This means that ideally resources (memory, file space, processor power) should be carefully shared in order to minimise the load on some of the elements of a distributed system. 3.The parallelism principle. This means that maximum use should be made the multiple elements of behind the distributed systems: Work in parallel to complete tasks

Principle of locality: These entities that should be close together are: –(1)Keeping data together: Probably the best known example of the locality principle is that data that is related to each other should be grouped together. One example of this where two tables which are related by virtue of the fact that they are often accessed together are moved onto the same server. –(2)Keeping programs together The idea behind this is that if two programs communicate with each other in a distributed system then, ideally, they should be located on the same computer or if not possible on the same local area network and in the worst case is where programs communicate by passing data over, a slow communication medium, such as wide area networks.

(3)Bringing users and data close together. There are two popular ways of implementing this principle. The first is the use of replicated data and the second is caching. –Replicated data: Data that is duplicated at various locations in a distributed system and so can be moved from a WAN to a LAN or same the same server. However, replicating of data requires synchronisation of the data which can be counter productive if many updates (changes to the data) take place –Caching is the storing of, a copy, frequently used data in a fast memory is an excellent way of speeding up a system for data which is not subject to much change. Then the have to use the same methods to synchronously update all the cached and original data (4)Keeping programs and data together: –same principles as users and data.

The principle of sharing –This principle is concerned with the sharing of resources – memory and processing. (1)Sharing amongst servers : A major decision to be made about the design of a distributed system is how the servers in a system are going to have the work performed by the system partitioned among them. The main rationale for sharing work amongst servers is to avoid bottlenecks where servers are overloaded with work which could be reallocated to other servers. (2)Sharing Memory : A distributed system will have, as a given, the fact that data should be shared between users. The two main decisions are where to situate the tables that make up a relational application and what locking strategy to adopt. –Where to store tables has already been covered –Locking is to ensure the integrity of data when transactions run concurrently (at the same time but not in parallel)

The parallelism principle –A key idea behind the parallel principle is that of load balancing: Should this program be split up into different parts which execute in parallel, either on a single server or on a number of distributed servers? partition a database into tables and files in order that the transactions are evenly spread around the file storage devices that are found on a distributed system. input/output parallelism. E.g. the use Redundant array of independent disks RAID which allows writes and reads in parallel.

7 Parallel Data Management The argument goes: –if your main problem is that your queries run too slowly, use more than one machine at a time to make them run faster (Parallel Processing). SMP – All the processors share the same memory and the O.S. runs and schedules tasks on more than one processor without distinction. –in other words, all processors are treated equally in an effort to get the list of jobs done. –However, SMP can suffer from bottleneck problems when all the CPUs attempt to access the same memory at once. MPP - more varied in its design, but essentially consists of multiple processors, each running their own program on their own memory i.e. memory is not shared between processors. –the problem with MPP is to harness all these processors to solve a single problem. –But they do not suffer from bottleneck problems

Distributed database design 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. 8

Concepts of Distribute databases Collection of logically-related shared data. Data split into fragments. Fragments may be replicated. Fragments/replicas allocated to sites. Sites linked by a communications network. Each DBMS participates in at least one global application. 9

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

Disadvantages of DDBMSs Complexity Cost Security of network Integrity control (concurrency and recovery) more difficult Database design more complex 11

Types of DDBMS Homogeneous DDBMS Heterogeneous DDBMS –Sites may run different DBMS products, with possibly different underlying data models. –Occurs when sites have implemented their own databases and integration is considered later: ad hoc planning. Enterprise resource planning (ERP) is the new approach that attempts to overcome this problem 12

Distributed Database Design criteria Three key issues : 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 (see principles of distribution design). Replication Copy of fragment may be maintained at several sites. 13

Fragmentation Quantitative information (replication) used for may include: –frequency with which an application is run; –site from which an application is run; –performance criteria for transactions and applications. Qualitative information (fragmentation) may include transactions that are executed by application: relations, attributes and tuples. 14

Comparison of Strategies for Data Distribution 15

Correctness of Fragmentation Three correctness rules: 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 Must be possible to define a relational operation that will reconstruct R from the fragments. Reconstruction for horizontal fragmentation is Union operation and Join for vertical. Disjointness If data item d i appears in fragment R i, then it should not appear in any other fragment.; Exception: vertical fragmentation, where primary key attributes must be repeated to allow reconstruction. For horizontal fragmentation, data item is a tuple (row) For vertical fragmentation, data item is an attribute. 16

Horizontal Fragmentation Consists of a subset of the tuples of a relation. Defined using Selection operation of relational algebra:  p (R) For example: P 1 =  type='House' (PropertyForRent) P 2 =  type='Flat' (PropertyForRent) Result (PNo., St, City, postcode,type,room,rent,ownerno.,staffno., branchno.) This strategy is determined by looking at predicates used by transactions. Reconstruction involves using a union eg R = r1 U r2 17

Vertical Fragmentation Consists of a subset of attributes of a relation. Defined using Projection operation of relational algebra:  a1,...,an (R) For example: S 1 =  staffNo, position, sex, DOB, salary (Staff) S 2 =  staffNo, fName, lName, branchNo (Staff) Determined by establishing affinity of one attribute to another. For vertical fragements reconstruction involves the join operation; Each fragment is disjointed except for the primary key 18

Mixed Fragmentation Consists of a horizontal fragment that is vertically fragmented, or a vertical fragment that is horizontally fragmented. Defined using Selection and Projection operations of relational algebra:  p (  a1,...,an (R)) or  a1,...,an (σ p (R)) 19

Essential Transaction criteria in a DDBMS The DDBMS must have the following ability –Allow transaction to run Concurrency –Allow for transaction failure and subsequent recovery –Improve transaction performance or query optimisation 20

Transaction (local/global) Concurrency All transactions must execute independently and be logically consistent with results obtained if transactions executed one at a time, in some arbitrary serial order. Same fundamental principles as for centralized DBMS. Replication makes concurrency more complex. –If a copy of a replicated data item is updated, update must be propagated to all copies. –However, if one site holding copy is not reachable, then transaction is delayed until site is reachable. 21

Failure and recovery of (local/global) transactions DDBMS must ensure atomicity and durability of global transaction. Means ensuring that sub-transactions of global transaction either all commit or all abort. Thus, DDBMS must synchronize global transaction to ensure that all sub-transactions have completed successfully before recording a final COMMIT for global transaction. Must do this in the presence of site and network failures. 22

Transaction (local/global) Performance or distributed query processing Must consider: –fragmentation, –replication, –allocation schemas. DQP has to decide e.g. : –which fragment to access; –which copy of a fragment to use; –which location to use. 23

Performance Transparency DQP produces an execution strategy optimized with respect to some cost function. Typically, costs associated with a distributed request include: –I/O cost; –Communication cost: WAN…. 24

DQP - Example Property(propNo, city)10000 records in London Client(clientNo,maxPrice) records in Glasgow Viewing(propNo, clientNo) records in London SELECT p.propNo FROM Property p INNER JOIN Client c INNER JOIN Viewing v ON c.clientNo = v.clientNo) ON p.propNo = v.propNo WHERE p.city=‘Aberdeen’ AND c.maxPrice > ; This query selects properties that viewed in aberdeen that have a price greater than £200,

Performance Transparency - Example Assume: Each tuple in each relation is 100 characters long. 10 renters with maximum price greater than £200, viewings for properties in Aberdeen. In addition the data transmission rate is 10,000 characters per sec and there is a 1 sec access delay to send a message. 26

Performance Transparency - Example Derive the following : 27

28 Question Three important characteristics of distributed databases are: Fragmentation, replication and allocation. –Explain what is meant by each term. –(8 marks) –Explain when one would decide when to implement a centralised system or a fragment distributed system –(10 marks) –Discuss the relationship between the principles of database design and the above characteristics of distributed databases –(12 marks)