SlideShare une entreprise Scribd logo
1  sur  22
R.BOOMADEVI.,M.C.A.,M.E
[A/P] CSE DEPARTMENT
CHRIST THE KING ENGINEERING COLLEGE
COIMBATORE
 A distributed database system consists of
loosely coupled sites that share no physical
component
 Appears to user as a single system
 Database systems that run on each site are
independent of each other
 Processing maybe done at a site other than the
initiator of request
 All sites have identical software
 They are aware of each other and agree to cooperate in
processing user requests
 It appears to user as a single system
 A distributed system connects three databases: hq, mfg, and sales
 An application can simultaneously access or modify the data in several
databases in a single distributed environment.
 In a heterogeneous distributed
database system, at least one of the
databases uses different schemas and
software.
 A database system having different schema may cause a
major problem for query processing.
 A database system having different software may cause a
major problem for transaction processing.
 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.
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.
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.
 One solution: choose one copy as primary copy and apply
concurrency control operations on primary copy.
 Data can be distributed by storing individual
tables at different sites
 Data can also be distributed by decomposing a
table and storing portions at different sites –
called Fragmentation
 Fragmentation can be horizontal or vertical
 Usage - in general applications use views so it’s appropriate to
work with subsets
 Efficiency - data stored close to where it is most frequently used
 Parallelism - a transaction can divided into several sub-queries to
increase degree of concurrency
 Security - data more secure - only stored where it is needed
Disadvantages:
Performance - may be slower
Integrity - more difficult
 Each fragment, Ti , of table T contains a
subset of the rows
 Each tuple of T is assigned to one or more
fragments.
 Horizontal fragmentation is lossless
 A bank account schema has a relation
Account-schema = (branch-name, account-number, balance).
 It fragments the relation by location and stores each fragment
locally: rows with branch-name = `Hillside` are stored in the Hillside
in a fragment
 Each fragment, Ti, of T contains a subset of the
columns, each column is in at least one fragment,
and each fragment includes the key:
Ti = Πattr_listi
(T)
T = T1 T2 ….. Tn
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.
 A employee-info schema has a relation
employee-info schema = (designation, name,
Employee-id, salary).
 It fragments the relation to put information in two
tables for security concern.
 Commit protocols are used to ensure
atomicity across sites
 Atomicity states that database modifications must
follow an “all or nothing” rule.
 a transaction which executes at multiple sites must
either be committed at all the sites, or aborted at all the
sites.
 What is this?
 Two-phase commit is a transaction protocol designed
for the complications that arise with distributed
resource managers.
 Two-phase commit technology is used for hotel and
airline reservations, stock market transactions, banking
applications, and credit card systems.
 With a two-phase commit protocol, the distributed
transaction manager employs a coordinator to manage
the individual resource managers. The commit process
proceeds as follows:
 Step 1  Coordinator asks all participants to
prepare to commit transaction Ti.
 Ci adds the records <prepare T> to the log and forces
log to stable storage (a log is a file which maintains a
record of all changes to the database)
 sends prepare T messages to all sites where T
executed
 Step 2  Upon receiving message, transaction
manager at site determines if it can commit the
transaction
 if not:
add a record <no T> to the log and send abort T
message to Ci
 if the transaction can be committed, then:
1). add the record <ready T> to the log
2). force all records for T to stable storage
3). send ready T message to Ci
 Step 1  T can be committed of Ci received a ready T
message from all the participating sites: otherwise T
must be aborted.
 Step 2  Coordinator adds a decision record,
<commit T> or <abort T>, to the log and forces record
onto stable storage. Once the record is in stable storage,
it cannot be revoked (even if failures occur)
 Step 3  Coordinator sends a message to each
participant informing it of the decision (commit or abort)
 Step 4  Participants take appropriate action locally.
 There have been two performance issues with two
phase commit:
◦ If one database server is unavailable, none of the
servers gets the updates.
◦ This is correctable through network tuning and correctly
building the data distribution through database
optimization techniques.
 THANK YOU

Contenu connexe

Tendances

Data base management system and Architecture ppt.
Data base management system and Architecture ppt.Data base management system and Architecture ppt.
Data base management system and Architecture ppt.AnkitAbhilashSwain
 
Major and Minor Elements of Object Model
Major and Minor Elements of Object ModelMajor and Minor Elements of Object Model
Major and Minor Elements of Object Modelsohailsaif
 
Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static ModelingSaurabh Kumar
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Typesaakanksha s
 
Distribution transparency and Distributed transaction
Distribution transparency and Distributed transactionDistribution transparency and Distributed transaction
Distribution transparency and Distributed transactionshraddha mane
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data modeljagdish_93
 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency controlBinte fatima
 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 ReliabilityAli Usman
 
Distributed database management systems
Distributed database management systemsDistributed database management systems
Distributed database management systemsUsman Tariq
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESAAKANKSHA JAIN
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management systemPooja Dixit
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database SystemMeghaj Mallick
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Meghaj Mallick
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques Kalhan Liyanage
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbmsRituBhargava7
 

Tendances (20)

Data base management system and Architecture ppt.
Data base management system and Architecture ppt.Data base management system and Architecture ppt.
Data base management system and Architecture ppt.
 
Major and Minor Elements of Object Model
Major and Minor Elements of Object ModelMajor and Minor Elements of Object Model
Major and Minor Elements of Object Model
 
Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static Modeling
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
 
Distribution transparency and Distributed transaction
Distribution transparency and Distributed transactionDistribution transparency and Distributed transaction
Distribution transparency and Distributed transaction
 
Multidimentional data model
Multidimentional data modelMultidimentional data model
Multidimentional data model
 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency control
 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
 
Distributed database management systems
Distributed database management systemsDistributed database management systems
Distributed database management systems
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
 
DDBMS
DDBMSDDBMS
DDBMS
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management system
 
serializability in dbms
serializability in dbmsserializability in dbms
serializability in dbms
 
Distributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query ProcessingDistributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query Processing
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
 
database recovery techniques
database recovery techniques database recovery techniques
database recovery techniques
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 

En vedette

Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database SystemSulemang
 
Distributed database
Distributed databaseDistributed database
Distributed databasesanjay joshi
 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and propertiesChetan Mahawar
 
Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikSaeed Siddik
 
Lecture 11 - distributed database
Lecture 11 - distributed databaseLecture 11 - distributed database
Lecture 11 - distributed databaseHoneySah
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactionsNilu Desai
 
Transaction Management
Transaction Management Transaction Management
Transaction Management Visakh V
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMSMegha Patel
 
Distributed databases
Distributed databasesDistributed databases
Distributed databasessourabhdave
 
Chapter 5 Database Transaction Management
Chapter 5 Database Transaction ManagementChapter 5 Database Transaction Management
Chapter 5 Database Transaction ManagementEddyzulham Mahluzydde
 
Transaction & Concurrency Control
Transaction & Concurrency ControlTransaction & Concurrency Control
Transaction & Concurrency ControlRavimuthurajan
 
Transaction management
Transaction managementTransaction management
Transaction managementrenuka_a
 
Transaction concurrency control
Transaction concurrency controlTransaction concurrency control
Transaction concurrency controlAnand Grewal
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency ControlDamian T. Gordon
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMSkoolkampus
 

En vedette (20)

Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database System
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and properties
 
Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddik
 
Lecture 11 - distributed database
Lecture 11 - distributed databaseLecture 11 - distributed database
Lecture 11 - distributed database
 
Dbms acid
Dbms acidDbms acid
Dbms acid
 
Acid properties
Acid propertiesAcid properties
Acid properties
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactions
 
Transaction Management
Transaction Management Transaction Management
Transaction Management
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
Distributed databases
Distributed databasesDistributed databases
Distributed databases
 
Chapter 5 Database Transaction Management
Chapter 5 Database Transaction ManagementChapter 5 Database Transaction Management
Chapter 5 Database Transaction Management
 
Transaction & Concurrency Control
Transaction & Concurrency ControlTransaction & Concurrency Control
Transaction & Concurrency Control
 
Transaction management
Transaction managementTransaction management
Transaction management
 
Transaction concurrency control
Transaction concurrency controlTransaction concurrency control
Transaction concurrency control
 
Databases: Concurrency Control
Databases: Concurrency ControlDatabases: Concurrency Control
Databases: Concurrency Control
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
 
Concurrency control
Concurrency controlConcurrency control
Concurrency control
 

Similaire à Distributed databases,types of database

19. Distributed Databases in DBMS
19. Distributed Databases in DBMS19. Distributed Databases in DBMS
19. Distributed Databases in DBMSkoolkampus
 
Distributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlDistributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlbalamurugan.k Kalibalamurugan
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryZainab Almugbel
 
Software architecture unit 4
Software architecture unit 4Software architecture unit 4
Software architecture unit 4yawani05
 
60141457-Oracle-Golden-Gate-Presentation.ppt
60141457-Oracle-Golden-Gate-Presentation.ppt60141457-Oracle-Golden-Gate-Presentation.ppt
60141457-Oracle-Golden-Gate-Presentation.pptpadalamail
 
DBMS - Distributed Databases
DBMS - Distributed DatabasesDBMS - Distributed Databases
DBMS - Distributed DatabasesMythiliMurugan3
 
Distribute Storage System May-2014
Distribute Storage System May-2014Distribute Storage System May-2014
Distribute Storage System May-2014Công Lợi Dương
 
17. Computer System Configuration And Methods
17. Computer System   Configuration And Methods17. Computer System   Configuration And Methods
17. Computer System Configuration And MethodsNew Era University
 
Transaction Management
Transaction ManagementTransaction Management
Transaction ManagementA. S. M. Shafi
 
Ch17 OS
Ch17 OSCh17 OS
Ch17 OSC.U
 
Chapter 18 - Distributed Coordination
Chapter 18 - Distributed CoordinationChapter 18 - Distributed Coordination
Chapter 18 - Distributed CoordinationWayne Jones Jnr
 
Distributed database. pdf
Distributed database. pdfDistributed database. pdf
Distributed database. pdfSurajGhadge15
 

Similaire à Distributed databases,types of database (20)

19. Distributed Databases in DBMS
19. Distributed Databases in DBMS19. Distributed Databases in DBMS
19. Distributed Databases in DBMS
 
DBMS UNIT V.pptx
DBMS UNIT V.pptxDBMS UNIT V.pptx
DBMS UNIT V.pptx
 
Chapter 4 u
Chapter 4 uChapter 4 u
Chapter 4 u
 
Distributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency controlDistributed datababase Transaction and concurrency control
Distributed datababase Transaction and concurrency control
 
Advance DBMS
Advance DBMSAdvance DBMS
Advance DBMS
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theory
 
Software architecture unit 4
Software architecture unit 4Software architecture unit 4
Software architecture unit 4
 
60141457-Oracle-Golden-Gate-Presentation.ppt
60141457-Oracle-Golden-Gate-Presentation.ppt60141457-Oracle-Golden-Gate-Presentation.ppt
60141457-Oracle-Golden-Gate-Presentation.ppt
 
INJRV01I10005.pdf
INJRV01I10005.pdfINJRV01I10005.pdf
INJRV01I10005.pdf
 
DBMS - Distributed Databases
DBMS - Distributed DatabasesDBMS - Distributed Databases
DBMS - Distributed Databases
 
Distribute Storage System May-2014
Distribute Storage System May-2014Distribute Storage System May-2014
Distribute Storage System May-2014
 
17. Computer System Configuration And Methods
17. Computer System   Configuration And Methods17. Computer System   Configuration And Methods
17. Computer System Configuration And Methods
 
DBMS UNIT 4
DBMS UNIT 4DBMS UNIT 4
DBMS UNIT 4
 
Transaction Management
Transaction ManagementTransaction Management
Transaction Management
 
Ch17 OS
Ch17 OSCh17 OS
Ch17 OS
 
OSCh17
OSCh17OSCh17
OSCh17
 
OS_Ch17
OS_Ch17OS_Ch17
OS_Ch17
 
Ch19
Ch19Ch19
Ch19
 
Chapter 18 - Distributed Coordination
Chapter 18 - Distributed CoordinationChapter 18 - Distributed Coordination
Chapter 18 - Distributed Coordination
 
Distributed database. pdf
Distributed database. pdfDistributed database. pdf
Distributed database. pdf
 

Distributed databases,types of database

  • 1. R.BOOMADEVI.,M.C.A.,M.E [A/P] CSE DEPARTMENT CHRIST THE KING ENGINEERING COLLEGE COIMBATORE
  • 2.  A distributed database system consists of loosely coupled sites that share no physical component  Appears to user as a single system  Database systems that run on each site are independent of each other  Processing maybe done at a site other than the initiator of request
  • 3.  All sites have identical software  They are aware of each other and agree to cooperate in processing user requests  It appears to user as a single system
  • 4.  A distributed system connects three databases: hq, mfg, and sales  An application can simultaneously access or modify the data in several databases in a single distributed environment.
  • 5.  In a heterogeneous distributed database system, at least one of the databases uses different schemas and software.  A database system having different schema may cause a major problem for query processing.  A database system having different software may cause a major problem for transaction processing.
  • 6.  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.
  • 7. 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.
  • 8. 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.  One solution: choose one copy as primary copy and apply concurrency control operations on primary copy.
  • 9.  Data can be distributed by storing individual tables at different sites  Data can also be distributed by decomposing a table and storing portions at different sites – called Fragmentation  Fragmentation can be horizontal or vertical
  • 10.  Usage - in general applications use views so it’s appropriate to work with subsets  Efficiency - data stored close to where it is most frequently used  Parallelism - a transaction can divided into several sub-queries to increase degree of concurrency  Security - data more secure - only stored where it is needed Disadvantages: Performance - may be slower Integrity - more difficult
  • 11.  Each fragment, Ti , of table T contains a subset of the rows  Each tuple of T is assigned to one or more fragments.  Horizontal fragmentation is lossless
  • 12.  A bank account schema has a relation Account-schema = (branch-name, account-number, balance).  It fragments the relation by location and stores each fragment locally: rows with branch-name = `Hillside` are stored in the Hillside in a fragment
  • 13.  Each fragment, Ti, of T contains a subset of the columns, each column is in at least one fragment, and each fragment includes the key: Ti = Πattr_listi (T) T = T1 T2 ….. Tn 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.
  • 14.  A employee-info schema has a relation employee-info schema = (designation, name, Employee-id, salary).  It fragments the relation to put information in two tables for security concern.
  • 15.  Commit protocols are used to ensure atomicity across sites  Atomicity states that database modifications must follow an “all or nothing” rule.  a transaction which executes at multiple sites must either be committed at all the sites, or aborted at all the sites.
  • 16.  What is this?  Two-phase commit is a transaction protocol designed for the complications that arise with distributed resource managers.  Two-phase commit technology is used for hotel and airline reservations, stock market transactions, banking applications, and credit card systems.  With a two-phase commit protocol, the distributed transaction manager employs a coordinator to manage the individual resource managers. The commit process proceeds as follows:
  • 17.  Step 1  Coordinator asks all participants to prepare to commit transaction Ti.  Ci adds the records <prepare T> to the log and forces log to stable storage (a log is a file which maintains a record of all changes to the database)  sends prepare T messages to all sites where T executed
  • 18.  Step 2  Upon receiving message, transaction manager at site determines if it can commit the transaction  if not: add a record <no T> to the log and send abort T message to Ci  if the transaction can be committed, then: 1). add the record <ready T> to the log 2). force all records for T to stable storage 3). send ready T message to Ci
  • 19.  Step 1  T can be committed of Ci received a ready T message from all the participating sites: otherwise T must be aborted.  Step 2  Coordinator adds a decision record, <commit T> or <abort T>, to the log and forces record onto stable storage. Once the record is in stable storage, it cannot be revoked (even if failures occur)  Step 3  Coordinator sends a message to each participant informing it of the decision (commit or abort)  Step 4  Participants take appropriate action locally.
  • 20.
  • 21.  There have been two performance issues with two phase commit: ◦ If one database server is unavailable, none of the servers gets the updates. ◦ This is correctable through network tuning and correctly building the data distribution through database optimization techniques.