SlideShare uma empresa Scribd logo
1 de 56
Chapter 10

Distributed databases
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.
Concepts









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.
Data at each site is under control of a DBMS.
DBMSs handle local applications autonomously.
Each DBMS participates in at least one global
application.
Component Architecture for a DDBMS
site 1

GDD

DDBMS
DC

LDBMS
GDD

Computer Network
DDBMS
DC
site 2

LDBMS : Local DBMS component
DC
: Data communication component
GDD
: Global Data Dictionary

DB
The Ideal Situation


A single application should be able to operate
transparently on data that is:
spread across a variety of different DBMS's
running on a variety of different machines
supported by a variety of different operating
systems
connected together by a variety of different
communication networks



The distribution can be geographical or local
Workable definition
A distributed database system consists of a collection of
sites connected together via some kind of
communications network, in which :
each site is a database system site in its own right;
the sites agree to work together, so that a user at any
site can access data anywhere in the network exactly
as if the data were all stored at the user's own site
It is a logical union of real databases
 It can be seen as a kind of partnership among individual
local DBMS's


Difference with remote access or distributed processing
systems



Temporary assumption: strict homogeneity
Distributed DBMS

5
Distributed Processing


A centralized database that can be accessed
over a computer network.

6
Parallel DBMS






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


Main architectures for parallel DBMSs are:
a:
b:
c:

Shared memory.
Shared disk.
Shared nothing.
Parallel DBMS

9
Advantages of DDBMSs








Organizational Structure
Shareability and Local Autonomy
Improved Availability
Improved Reliability
Improved Performance
Economics
Modular Growth
Disadvantages of DDBMSs








Complexity
Cost
Security
Integrity Control More Difficult
Lack of Standards
Lack of Experience
Database Design More Complex
Types of DDBMS



Homogeneous DDBMS
Heterogeneous DDBMS
Homogeneous DDBMS




All sites use same DBMS product.
Much easier to design and manage.
Approach provides incremental growth and
allows increased performance.
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.
Translations required to allow for:
Different hardware.
Different DBMS products.
Different hardware and different DBMS products.



Typical solution is to use gateways.
Open Database Access and Interoperability




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.
 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.
Multidatabase System (MDBS)


DDBMS in which each site maintains complete
autonomy.



DBMS that resides transparently on top of
existing database and file systems and
presents a single database to its users.
Allows users to access and share data without
requiring physical database integration.
Non-federated MDBS (no local users) and
federated MDBS (FMDBS).




Functions of a DDBMS




Expect DDBMS to have at least the
functionality of a DBMS.
Also to have following functionality:






Extended communication services.
Extended Data Dictionary.
Distributed query processing.
Extended concurrency control.
Extended recovery services.
Reference Architecture for DDBMS




Due to diversity, no universally accepted
architecture such as the ANSI/SPARC 3-level
architecture.
A reference architecture consists of:
Set of global external schemas.
Global conceptual schema (GCS).
Fragmentation schema and allocation schema.
Set of schemas for each local DBMS conforming to
3-level ANSI/SPARC .



Some levels may be missing, depending on
levels of transparency supported.
Reference Architecture for DDBMS
Reference Architecture for MDBS








In DDBMS, GCS is union of all local conceptual
schemas.
In FMDBS, GCS is subset of local conceptual
schemas (LCS), consisting of data that each
local system agrees to share.
GCS of tightly coupled system involves
integration of either parts of LCSs or local
external schemas.
FMDBS with no GCS is called loosely coupled.
Reference Architecture for TightlyCoupled Federated MDBS
Components of a DDBMS

25
Distributed Database Design


Three key issues:
Fragmentation.
Allocation
Replication
Distributed Database Design


Fragmentation
Relation may be divided into a number of subrelations, 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


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


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


Four alternative strategies regarding
placement of data:
Centralized
Partitioned (or Fragmented)
Complete Replication
Selective Replication
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.
Data Allocation


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
Why Fragment?


Usage
Applications work with views rather than entire
relations.



Efficiency
Data is stored close to where it is most frequently
used.
Data that is not needed by local applications is not
stored.
Why Fragment?


Parallelism
With fragments as unit of distribution, transaction
can be divided into several subqueries that operate
on fragments.



Security
Data not required by local applications is not stored
and so not available to unauthorized users.



Disadvantages
Performance
Integrity.
Correctness of Fragmentation


Three correctness rules:
Completeness
Reconstruction
Disjointness.
Correctness of Fragmentation


Completeness
 If relation R is decomposed into fragments R1,
R2, ... Rn, 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 .
Correctness of Fragmentation









Disjointness
If data item di appears in fragment Ri, 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
For vertical fragmentation, data item is an
attribute.
Types of Fragmentation


Four types of fragmentation:
Horizontal
Vertical
Mixed
Derived.



Other possibility is no fragmentation:
If relation is small and not updated frequently, may
be better not to fragment relation.
Horizontal and Vertical Fragmentation

41
Mixed Fragmentation
Horizontal Fragmentation








This strategy is determined by looking at
predicates used by transactions.
Involves finding set of minimal (complete and
relevant) predicates.
Set of predicates is complete, if and only if, any
two tuples in same fragment are referenced
with same probability by any application.
Predicate is relevant if there is at least one
application that accesses fragments
differently.
Transparencies in a DDBMS


Distribution Transparency
Fragmentation Transparency
Location Transparency
Replication Transparency
Local Mapping Transparency
Naming Transparency
Transparencies in a DDBMS


Transaction Transparency
Concurrency Transparency
Failure Transparency



Performance Transparency



DBMS Transparency
Distribution Transparency




Distribution transparency allows user to
perceive database as single, logical entity.
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.



With replication transparency, user is unaware
of replication of fragments .
Naming Transparency





Each item in a DDB must have a unique name.
DDBMS must ensure that no two sites create a
database object with same name.
One solution is to create central name server.
However, this results in:
loss of some local autonomy;
central site may become a bottleneck;
low availability; if the central site fails, remaining
sites cannot create any new objects.
Transaction Transparency








Ensures that all distributed transactions
maintain distributed database’s integrity and
consistency.
Distributed transaction accesses data stored at
more than one location.
Each transaction is divided into number of subtransactions, one for each site that has to be
accessed.
DDBMS must ensure the indivisibility of both
the global transaction and each
subtransactions.
Concurrency Transparency








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.
DDBMS must ensure both global and local
transactions do not interfere with each other.
Similarly, DDBMS must ensure consistency of
all sub-transactions of global transaction.
Concurrency Transparency







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

Could limit update propagation to only those
sites currently available. Remaining sites
updated when they become available again.



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.
Failure Transparency








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 presence of site and network
failures.
Performance Transparency


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.
Performance Transparency






Distributed Query Processor (DQP) maps data
request into ordered sequence of operations
on local databases.
Must consider fragmentation, replication, and
allocation schemas.
DQP has to decide:
which fragment to access;
which copy of a fragment to use;
which location to use.
Performance Transparency




DQP produces execution strategy optimized
with respect to some cost function.
Typically, costs associated with a distributed
request include:
I/O cost;
CPU cost;
communication cost.
Date’s 12 Rules for a DDBMS


0.

Fundamental Principle
 To the user, a distributed system should look
exactly like a non-distributed system.








1.
2.
3.
4.
5.
6.

Local Autonomy
No Reliance on a Central Site
Continuous Operation
Location Independence
Fragmentation Independence
Replication Independence
Date’s 12 Rules for a DDBMS









7.
8.
9.
10.
11.
12.

Distributed Query Processing
Distributed Transaction Processing
Hardware Independence
Operating System Independence
Network Independence
Database Independence

Last four rules are ideals.

Mais conteúdo relacionado

Mais procurados

Multimedia Database
Multimedia Database Multimedia Database
Multimedia Database Avnish Patel
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed SystemSunita Sahu
 
20. Parallel Databases in DBMS
20. Parallel Databases in DBMS20. Parallel Databases in DBMS
20. Parallel Databases in DBMSkoolkampus
 
Data cube computation
Data cube computationData cube computation
Data cube computationRashmi Sheikh
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database SystemMeghaj Mallick
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query ProcessingMythili Kannan
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architectureMaulik Togadiya
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency ControlDilum Bandara
 
Fragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseFragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseAbhilasha Lahigude
 
Lecture6 introduction to data streams
Lecture6 introduction to data streamsLecture6 introduction to data streams
Lecture6 introduction to data streamshktripathy
 
Seven step model of migration into the cloud
Seven step model of migration into the cloudSeven step model of migration into the cloud
Seven step model of migration into the cloudRaj Raj
 
Distributed shared memory shyam soni
Distributed shared memory shyam soniDistributed shared memory shyam soni
Distributed shared memory shyam soniShyam Soni
 
Replication Techniques for Distributed Database Design
Replication Techniques for Distributed Database DesignReplication Techniques for Distributed Database Design
Replication Techniques for Distributed Database DesignMeghaj Mallick
 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency controlBinte fatima
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Meghaj Mallick
 

Mais procurados (20)

Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
 
Multimedia Database
Multimedia Database Multimedia Database
Multimedia Database
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
 
20. Parallel Databases in DBMS
20. Parallel Databases in DBMS20. Parallel Databases in DBMS
20. Parallel Databases in DBMS
 
Data Models
Data ModelsData Models
Data Models
 
Data cube computation
Data cube computationData cube computation
Data cube computation
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query Processing
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency Control
 
Fragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed DatabaseFragmentation and types of fragmentation in Distributed Database
Fragmentation and types of fragmentation in Distributed Database
 
Lecture6 introduction to data streams
Lecture6 introduction to data streamsLecture6 introduction to data streams
Lecture6 introduction to data streams
 
DDBMS
DDBMSDDBMS
DDBMS
 
Seven step model of migration into the cloud
Seven step model of migration into the cloudSeven step model of migration into the cloud
Seven step model of migration into the cloud
 
Distributed shared memory shyam soni
Distributed shared memory shyam soniDistributed shared memory shyam soni
Distributed shared memory shyam soni
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 
Replication Techniques for Distributed Database Design
Replication Techniques for Distributed Database DesignReplication Techniques for Distributed Database Design
Replication Techniques for Distributed Database Design
 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency control
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
 
Distributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query ProcessingDistributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query Processing
 

Destaque

Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management SystemHardik Patil
 
Difference between Homogeneous and Heterogeneous
Difference between Homogeneous  and    HeterogeneousDifference between Homogeneous  and    Heterogeneous
Difference between Homogeneous and HeterogeneousFaraz Qaisrani
 
Heterogeneous Or Homogeneous Classrooms Jane
Heterogeneous Or Homogeneous Classrooms   JaneHeterogeneous Or Homogeneous Classrooms   Jane
Heterogeneous Or Homogeneous Classrooms JaneKevin Hodgson
 
Hetrogenous Vs Homogenous
Hetrogenous Vs HomogenousHetrogenous Vs Homogenous
Hetrogenous Vs Homogenoustrevor.fockler
 
Heterogeneous vs. Homogenous product ecosystems
Heterogeneous vs. Homogenous product ecosystemsHeterogeneous vs. Homogenous product ecosystems
Heterogeneous vs. Homogenous product ecosystemscrayg
 
Distributed database management systems
Distributed database management systemsDistributed database management systems
Distributed database management systemsDhani Ahmad
 

Destaque (6)

Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management System
 
Difference between Homogeneous and Heterogeneous
Difference between Homogeneous  and    HeterogeneousDifference between Homogeneous  and    Heterogeneous
Difference between Homogeneous and Heterogeneous
 
Heterogeneous Or Homogeneous Classrooms Jane
Heterogeneous Or Homogeneous Classrooms   JaneHeterogeneous Or Homogeneous Classrooms   Jane
Heterogeneous Or Homogeneous Classrooms Jane
 
Hetrogenous Vs Homogenous
Hetrogenous Vs HomogenousHetrogenous Vs Homogenous
Hetrogenous Vs Homogenous
 
Heterogeneous vs. Homogenous product ecosystems
Heterogeneous vs. Homogenous product ecosystemsHeterogeneous vs. Homogenous product ecosystems
Heterogeneous vs. Homogenous product ecosystems
 
Distributed database management systems
Distributed database management systemsDistributed database management systems
Distributed database management systems
 

Semelhante a Distributed Database System

Lecture 11 - distributed database
Lecture 11 - distributed databaseLecture 11 - distributed database
Lecture 11 - distributed databaseHoneySah
 
Chapter-6 Distribute Database system (3).ppt
Chapter-6 Distribute Database system (3).pptChapter-6 Distribute Database system (3).ppt
Chapter-6 Distribute Database system (3).pptlatigudata
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed databaseSonia Panesar
 
Lec 8 (distributed database)
Lec 8 (distributed database)Lec 8 (distributed database)
Lec 8 (distributed database)Sudarshan Mondal
 
Distributed databases and dbm ss
Distributed databases and dbm ssDistributed databases and dbm ss
Distributed databases and dbm ssMohd Arif
 
Distributed database
Distributed databaseDistributed database
Distributed databasesanjay joshi
 
Week 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseWeek 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseAnne Lee
 
A database management system
A database management systemA database management system
A database management systemghulam120
 
Distributed database
Distributed databaseDistributed database
Distributed databaseAhmed Salama
 
DBMS - Distributed Databases
DBMS - Distributed DatabasesDBMS - Distributed Databases
DBMS - Distributed DatabasesMythiliMurugan3
 
A N S I S P A R C Architecture
A N S I  S P A R C  ArchitectureA N S I  S P A R C  Architecture
A N S I S P A R C ArchitectureSabeeh Ahmed
 

Semelhante a Distributed Database System (20)

1 ddbms jan 2011_u
1 ddbms jan 2011_u1 ddbms jan 2011_u
1 ddbms jan 2011_u
 
Lecture 11 - distributed database
Lecture 11 - distributed databaseLecture 11 - distributed database
Lecture 11 - distributed database
 
DDBS PPT (1).pptx
DDBS PPT (1).pptxDDBS PPT (1).pptx
DDBS PPT (1).pptx
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
Chapter-6 Distribute Database system (3).ppt
Chapter-6 Distribute Database system (3).pptChapter-6 Distribute Database system (3).ppt
Chapter-6 Distribute Database system (3).ppt
 
Advance DBMS
Advance DBMSAdvance DBMS
Advance DBMS
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed database
 
Lec 8 (distributed database)
Lec 8 (distributed database)Lec 8 (distributed database)
Lec 8 (distributed database)
 
Distributed databases and dbm ss
Distributed databases and dbm ssDistributed databases and dbm ss
Distributed databases and dbm ss
 
Chapter25
Chapter25Chapter25
Chapter25
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Week 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseWeek 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed database
 
DDBMS.pptx
DDBMS.pptxDDBMS.pptx
DDBMS.pptx
 
T7
T7T7
T7
 
Pptofdistributeddb
PptofdistributeddbPptofdistributeddb
Pptofdistributeddb
 
A database management system
A database management systemA database management system
A database management system
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
DBMS - Distributed Databases
DBMS - Distributed DatabasesDBMS - Distributed Databases
DBMS - Distributed Databases
 
A N S I S P A R C Architecture
A N S I  S P A R C  ArchitectureA N S I  S P A R C  Architecture
A N S I S P A R C Architecture
 
Lecture#5
Lecture#5Lecture#5
Lecture#5
 

Último

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Distributed Database System

  • 2.
  • 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.
  • 4. Concepts         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. Data at each site is under control of a DBMS. DBMSs handle local applications autonomously. Each DBMS participates in at least one global application.
  • 5. Component Architecture for a DDBMS site 1 GDD DDBMS DC LDBMS GDD Computer Network DDBMS DC site 2 LDBMS : Local DBMS component DC : Data communication component GDD : Global Data Dictionary DB
  • 6. The Ideal Situation  A single application should be able to operate transparently on data that is: spread across a variety of different DBMS's running on a variety of different machines supported by a variety of different operating systems connected together by a variety of different communication networks  The distribution can be geographical or local
  • 7. Workable definition A distributed database system consists of a collection of sites connected together via some kind of communications network, in which : each site is a database system site in its own right; the sites agree to work together, so that a user at any site can access data anywhere in the network exactly as if the data were all stored at the user's own site It is a logical union of real databases  It can be seen as a kind of partnership among individual local DBMS's  Difference with remote access or distributed processing systems  Temporary assumption: strict homogeneity
  • 9. Distributed Processing  A centralized database that can be accessed over a computer network. 6
  • 10. Parallel DBMS    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.
  • 11. Parallel DBMS  Main architectures for parallel DBMSs are: a: b: c: Shared memory. Shared disk. Shared nothing.
  • 13. Advantages of DDBMSs        Organizational Structure Shareability and Local Autonomy Improved Availability Improved Reliability Improved Performance Economics Modular Growth
  • 14. Disadvantages of DDBMSs        Complexity Cost Security Integrity Control More Difficult Lack of Standards Lack of Experience Database Design More Complex
  • 15. Types of DDBMS   Homogeneous DDBMS Heterogeneous DDBMS
  • 16. Homogeneous DDBMS    All sites use same DBMS product. Much easier to design and manage. Approach provides incremental growth and allows increased performance.
  • 17. 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. Translations required to allow for: Different hardware. Different DBMS products. Different hardware and different DBMS products.  Typical solution is to use gateways.
  • 18. Open Database Access and Interoperability   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.  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.
  • 19. Multidatabase System (MDBS)  DDBMS in which each site maintains complete autonomy.  DBMS that resides transparently on top of existing database and file systems and presents a single database to its users. Allows users to access and share data without requiring physical database integration. Non-federated MDBS (no local users) and federated MDBS (FMDBS).  
  • 20. Functions of a DDBMS   Expect DDBMS to have at least the functionality of a DBMS. Also to have following functionality:      Extended communication services. Extended Data Dictionary. Distributed query processing. Extended concurrency control. Extended recovery services.
  • 21. Reference Architecture for DDBMS   Due to diversity, no universally accepted architecture such as the ANSI/SPARC 3-level architecture. A reference architecture consists of: Set of global external schemas. Global conceptual schema (GCS). Fragmentation schema and allocation schema. Set of schemas for each local DBMS conforming to 3-level ANSI/SPARC .  Some levels may be missing, depending on levels of transparency supported.
  • 23. Reference Architecture for MDBS     In DDBMS, GCS is union of all local conceptual schemas. In FMDBS, GCS is subset of local conceptual schemas (LCS), consisting of data that each local system agrees to share. GCS of tightly coupled system involves integration of either parts of LCSs or local external schemas. FMDBS with no GCS is called loosely coupled.
  • 24. Reference Architecture for TightlyCoupled Federated MDBS
  • 25. Components of a DDBMS 25
  • 26. Distributed Database Design  Three key issues: Fragmentation. Allocation Replication
  • 27. Distributed Database Design  Fragmentation Relation may be divided into a number of subrelations, which are then distributed.  Allocation Each fragment is stored at site with "optimal" distribution.  Replication Copy of fragment may be maintained at several sites.
  • 28. Fragmentation  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.
  • 29. Fragmentation  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.
  • 30. Data Allocation  Four alternative strategies regarding placement of data: Centralized Partitioned (or Fragmented) Complete Replication Selective Replication
  • 31. 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.
  • 32. Data Allocation  Complete Replication Consists of maintaining complete copy of database at each site.  Selective Replication Combination of partitioning, replication, and centralization.
  • 33. Comparison of Strategies for Data Distribution 33
  • 34. Why Fragment?  Usage Applications work with views rather than entire relations.  Efficiency Data is stored close to where it is most frequently used. Data that is not needed by local applications is not stored.
  • 35. Why Fragment?  Parallelism With fragments as unit of distribution, transaction can be divided into several subqueries that operate on fragments.  Security Data not required by local applications is not stored and so not available to unauthorized users.  Disadvantages Performance Integrity.
  • 36. Correctness of Fragmentation  Three correctness rules: Completeness Reconstruction Disjointness.
  • 37. Correctness of Fragmentation  Completeness  If relation R is decomposed into fragments R1, R2, ... Rn, 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 .
  • 38. Correctness of Fragmentation      Disjointness If data item di appears in fragment Ri, 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 For vertical fragmentation, data item is an attribute.
  • 39. Types of Fragmentation  Four types of fragmentation: Horizontal Vertical Mixed Derived.  Other possibility is no fragmentation: If relation is small and not updated frequently, may be better not to fragment relation.
  • 40. Horizontal and Vertical Fragmentation 41
  • 42. Horizontal Fragmentation     This strategy is determined by looking at predicates used by transactions. Involves finding set of minimal (complete and relevant) predicates. Set of predicates is complete, if and only if, any two tuples in same fragment are referenced with same probability by any application. Predicate is relevant if there is at least one application that accesses fragments differently.
  • 43. Transparencies in a DDBMS  Distribution Transparency Fragmentation Transparency Location Transparency Replication Transparency Local Mapping Transparency Naming Transparency
  • 44. Transparencies in a DDBMS  Transaction Transparency Concurrency Transparency Failure Transparency  Performance Transparency  DBMS Transparency
  • 45. Distribution Transparency   Distribution transparency allows user to perceive database as single, logical entity. 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.  With replication transparency, user is unaware of replication of fragments .
  • 46. Naming Transparency    Each item in a DDB must have a unique name. DDBMS must ensure that no two sites create a database object with same name. One solution is to create central name server. However, this results in: loss of some local autonomy; central site may become a bottleneck; low availability; if the central site fails, remaining sites cannot create any new objects.
  • 47. Transaction Transparency     Ensures that all distributed transactions maintain distributed database’s integrity and consistency. Distributed transaction accesses data stored at more than one location. Each transaction is divided into number of subtransactions, one for each site that has to be accessed. DDBMS must ensure the indivisibility of both the global transaction and each subtransactions.
  • 48. Concurrency Transparency     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. DDBMS must ensure both global and local transactions do not interfere with each other. Similarly, DDBMS must ensure consistency of all sub-transactions of global transaction.
  • 49. Concurrency Transparency     Replication makes concurrency more complex. If a copy of a replicated data item is updated, update must be propagated to all copies. Could propagate changes as part of original transaction, making it an atomic operation. However, if one site holding copy is not reachable, then transaction is delayed until site is reachable.
  • 50. Concurrency Transparency  Could limit update propagation to only those sites currently available. Remaining sites updated when they become available again.  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.
  • 51. Failure Transparency     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 presence of site and network failures.
  • 52. Performance Transparency  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.
  • 53. Performance Transparency    Distributed Query Processor (DQP) maps data request into ordered sequence of operations on local databases. Must consider fragmentation, replication, and allocation schemas. DQP has to decide: which fragment to access; which copy of a fragment to use; which location to use.
  • 54. Performance Transparency   DQP produces execution strategy optimized with respect to some cost function. Typically, costs associated with a distributed request include: I/O cost; CPU cost; communication cost.
  • 55. Date’s 12 Rules for a DDBMS  0. Fundamental Principle  To the user, a distributed system should look exactly like a non-distributed system.       1. 2. 3. 4. 5. 6. Local Autonomy No Reliance on a Central Site Continuous Operation Location Independence Fragmentation Independence Replication Independence
  • 56. Date’s 12 Rules for a DDBMS        7. 8. 9. 10. 11. 12. Distributed Query Processing Distributed Transaction Processing Hardware Independence Operating System Independence Network Independence Database Independence Last four rules are ideals.