SlideShare a Scribd company logo
1 of 33
Distributed Database
Md. Mahadi Hassan Rakib
Lecturer, Department of Computer Science and Engineering
North Western University, Khulna
Outline
 Concept
 Distributed Database Types
– Homogeneous
– Heterogeneous
 Distributed Database Design
– Data Fragmentation
– Data Allocation
– Data Replication
Concept
A distributed database (DDB) is a collection of multiple,
logically interrelated databases distributed over a
computer network.
A distributed database management system (D–DBMS)
is the software that manages the DDB and provides an
access mechanism that makes this distribution transpare
nt to the users.
Distributed database system (DDBS) = DDB + D–DBMS
Concept
 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.
Functionality
 Security
 Keeping track of data
 Replicated data management
 System catalog management
 Distributed transaction management
 Distributed database recovery
Distributed DBMS
Component Architecture for a D-DBMS
Advantages of D-DBMS
 Organizational Structure
 Share-ability and Local Autonomy
 Improved Availability
 Improved Reliability
 Improved Performance
 Economics
 Modular Growth
Disadvantages of D-DBMS
 Complexity
 Cost
 Security
 Integrity Control More Difficult
 Lack of Standards
 Lack of Experience
 Database Design More Complex
Types of D-DBMS
 Homogeneous D-DBMS
 Heterogeneous D-DBMS
Homogeneous D-DBMS
 All sites have identical software and are aware of each other and
agree to cooperate in processing user requests.
 Much easier to design and manage
 The operating system used, at each location must be same or
compatible.
 The database application (or DBMS) used at each location must be
same or compatible.
 It appears to user as a single system
 All access is through one, global schema
 The global schema is the union of all the local schema
Homogeneous Database
Homogeneous Distributed Database Example
 A distributed system connects three databases: hq, mfg, and sales
 An application can simultaneously access or modify the data in several datab
ases in a single distributed environment.
Heterogeneous D-DBMS
Different sites may use different schema and softw
are.
Different nodes may have different hardware & sof
tware and data structures at various nodes or locat
ions are also incompatible.
Different computers and operating systems, data
base applications or data models may be used at ea
ch of the locations.
Difficult to manage and design.
Typical Heterogeneous Environment
Distributed Database Design
 Three key issues:
 Data Fragmentation
• Relation may be divided into a number of sub rel
ations, which are then distributed.
• Breaking up the database into logical units called
fragments and assigned for storage at various sit
es.
 Data Allocation
• The process of assigning a particular fragment to
a particular site in a distributed system.
 Data Replication
• Copy of fragment may be maintained at several si
Distributed Database Design
 Data Fragmentation
 data can be distributed by storing individual
tables at different sites
 data can also be distributed by decomposing a tab
le and storing portions at different sites – called Fr
agmentation
 fragmentation can be horizontal or vertical
Horizontal and Vertical Fragmentation
Why use Fragmentation?
 Usage - in general applications use views so it’s appropri
ate to work with subsets
 Efficiency - data stored close to where it is most frequentl
y used
 Parallelism - a transaction can divided into several sub-q
ueries to increase degree of concurrency
 Security - data more secure - only stored where it is need
ed
Disadvantages:
Performance - may be slower
Integrity - more difficult
Distributed Database Design
 Horizontal Fragmentation
 Each fragment, Ti , of table T contains a subset of
the rows
 Each tuple of T is assigned to one or more fragme
nts
 Horizontal fragmentation is lossless
 A selection condition may be composed of several cond
itions connected by AND or OR
 Derived horizontal fragmentation: It is the partitioning
of a primary relation to other secondary relations which
are related with Foreign keys
Horizontal Fragmentation Example
 A bank account schema has a relation
Account-schema = (branch-name, account-number, balance).
 It fragments the relation by location and stores each fragment l
ocally: rows with branch-name = `Hillside` are stored in the H
illside in a fragment
Horizontal Fragmentation Example
Distributed Database Design
 Vertical Fragmentation
 It is a subset of a relation which is created by a subset of colum
ns. Thus a vertical fragment of a relation will contain values of
selected columns. There is no selection condition used in verti
cal fragmentation.
 Consider the customer relation. A vertical fragment can be cre
ated by keeping the values of Name, Area, Sex.
 Because there is no condition for creating a vertical fragment, e
ach fragment must include the primary key attribute of the pare
nt relation customer. In this way all vertical fragments of a relati
on are connected.
Vertical Fragmentation Example
Distributed Database Design
 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 a
t one site with users distributed across the netw
ork.
 Partitioned
 Database partitioned into disjoint fragments, ea
ch fragment assigned to one site.
 Complete Replication
 Consists of maintaining complete copy of datab
ase at each site.
Selective Replication
 Combination of partitioning, replication, and cen
tralization.
Distributed Database Design
 Data Replication
 System maintains multiple copies of data, stored i
n different sites, for faster retrieval and fault tolera
nce.
Issues of Replication
 Data timeliness – high tolerance for out-of-date data m
ay be required
 DBMS capabilities – if DBMS cannot support multi-nod
e queries, replication may be necessary
 Performance implications – refreshing may cause per
formance problems for busy nodes
 Network heterogeneity – complicates replication
 Network communication capabilities – complete refre
shes place heavy demand on telecommunications
Advantages of Replication
 Availability: failure of site containing relation r does not res
ult 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 s
ite containing a replica of r.
Disadvantages of Replication
Increased cost of updates: each replica of relation r must be updat
ed.
Increased complexity of concurrency control: concurrent updates t
o distinct replicas may lead to inconsistent data unless special c
oncurrency control mechanisms are implemented.
One solution: choose one copy as primary copy and apply concurrency c
ontrol operations on primary copy.
Lec 8 (distributed database)
Lec 8 (distributed database)

More Related Content

What's hot (19)

8 drived horizontal fragmentation
8  drived horizontal fragmentation8  drived horizontal fragmentation
8 drived horizontal fragmentation
 
Final exam in advance dbms
Final exam in advance dbmsFinal exam in advance dbms
Final exam in advance dbms
 
Distributed design alternatives
Distributed design alternativesDistributed design alternatives
Distributed design alternatives
 
Distributed Database Management System
Distributed Database Management SystemDistributed Database Management System
Distributed Database Management System
 
Database fragmentation
Database fragmentationDatabase fragmentation
Database fragmentation
 
2 ddb architecture
2 ddb architecture2 ddb architecture
2 ddb architecture
 
DDBMS Paper with Solution
DDBMS Paper with SolutionDDBMS Paper with Solution
DDBMS Paper with Solution
 
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
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
 
Adbms 24 data fragmentation
Adbms 24 data fragmentationAdbms 24 data fragmentation
Adbms 24 data fragmentation
 
DBMS - RAID
DBMS - RAIDDBMS - RAID
DBMS - RAID
 
DDBMS
DDBMSDDBMS
DDBMS
 
Pptofdistributeddb
PptofdistributeddbPptofdistributeddb
Pptofdistributeddb
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
Distributed DBMS - Unit 1 - Introduction
Distributed DBMS - Unit 1 - IntroductionDistributed DBMS - Unit 1 - Introduction
Distributed DBMS - Unit 1 - Introduction
 
3 design
3 design3 design
3 design
 
Lec 7 query processing
Lec 7 query processingLec 7 query processing
Lec 7 query processing
 
23. Advanced Datatypes and New Application in DBMS
23. Advanced Datatypes and New Application in DBMS23. Advanced Datatypes and New Application in DBMS
23. Advanced Datatypes and New Application in DBMS
 
19. Distributed Databases in DBMS
19. Distributed Databases in DBMS19. Distributed Databases in DBMS
19. Distributed Databases in DBMS
 

Similar to Lec 8 (distributed database)

DBMS - Distributed Databases
DBMS - Distributed DatabasesDBMS - Distributed Databases
DBMS - Distributed DatabasesMythiliMurugan3
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed databaseSonia Panesar
 
ditributed databases
ditributed databasesditributed databases
ditributed databasesHira Awan
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database SystemSulemang
 
Distributed database
Distributed databaseDistributed database
Distributed databasesanjay joshi
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESAAKANKSHA JAIN
 
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
 
Distributed database. pdf
Distributed database. pdfDistributed database. pdf
Distributed database. pdfSurajGhadge15
 
Distributed database
Distributed databaseDistributed database
Distributed databasesanjay joshi
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management systemPooja Dixit
 
Unit-1 Introduction to Big Data.pptx
Unit-1 Introduction to Big Data.pptxUnit-1 Introduction to Big Data.pptx
Unit-1 Introduction to Big Data.pptxAnkitChauhan817826
 
A Review On Fragmentation Techniques In Distributed Database
A Review On Fragmentation Techniques In Distributed DatabaseA Review On Fragmentation Techniques In Distributed Database
A Review On Fragmentation Techniques In Distributed DatabaseJose Katab
 
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptxSantosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptxSANTOSH KUMAR MEHER
 
Distributed databases
Distributed databasesDistributed databases
Distributed databasesSuneel Dogra
 

Similar to Lec 8 (distributed database) (20)

DDBS PPT (1).pptx
DDBS PPT (1).pptxDDBS PPT (1).pptx
DDBS PPT (1).pptx
 
DBMS - Distributed Databases
DBMS - Distributed DatabasesDBMS - Distributed Databases
DBMS - Distributed Databases
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed database
 
ditributed databases
ditributed databasesditributed databases
ditributed databases
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database System
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUESDISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
DISTRIBUTED DATABASE WITH RECOVERY TECHNIQUES
 
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
 
Distributed D B
Distributed  D BDistributed  D B
Distributed D B
 
Distributed database. pdf
Distributed database. pdfDistributed database. pdf
Distributed database. pdf
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management system
 
Unit-1 Introduction to Big Data.pptx
Unit-1 Introduction to Big Data.pptxUnit-1 Introduction to Big Data.pptx
Unit-1 Introduction to Big Data.pptx
 
DDBMS.pptx
DDBMS.pptxDDBMS.pptx
DDBMS.pptx
 
A Review On Fragmentation Techniques In Distributed Database
A Review On Fragmentation Techniques In Distributed DatabaseA Review On Fragmentation Techniques In Distributed Database
A Review On Fragmentation Techniques In Distributed Database
 
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptxSantosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
Santosh Kumar Meher(2105040008) DISTRIBUTED DATABASE.pptx
 
Distributed databases
Distributed databasesDistributed databases
Distributed databases
 
Advance DBMS
Advance DBMSAdvance DBMS
Advance DBMS
 
Distributed Database
Distributed DatabaseDistributed Database
Distributed Database
 

Recently uploaded

Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 

Recently uploaded (20)

Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 

Lec 8 (distributed database)

  • 1. Distributed Database Md. Mahadi Hassan Rakib Lecturer, Department of Computer Science and Engineering North Western University, Khulna
  • 2. Outline  Concept  Distributed Database Types – Homogeneous – Heterogeneous  Distributed Database Design – Data Fragmentation – Data Allocation – Data Replication
  • 3. Concept A distributed database (DDB) is a collection of multiple, logically interrelated databases distributed over a computer network. A distributed database management system (D–DBMS) is the software that manages the DDB and provides an access mechanism that makes this distribution transpare nt to the users. Distributed database system (DDBS) = DDB + D–DBMS
  • 4. Concept  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. Functionality  Security  Keeping track of data  Replicated data management  System catalog management  Distributed transaction management  Distributed database recovery
  • 8. Advantages of D-DBMS  Organizational Structure  Share-ability and Local Autonomy  Improved Availability  Improved Reliability  Improved Performance  Economics  Modular Growth
  • 9. Disadvantages of D-DBMS  Complexity  Cost  Security  Integrity Control More Difficult  Lack of Standards  Lack of Experience  Database Design More Complex
  • 10. Types of D-DBMS  Homogeneous D-DBMS  Heterogeneous D-DBMS
  • 11. Homogeneous D-DBMS  All sites have identical software and are aware of each other and agree to cooperate in processing user requests.  Much easier to design and manage  The operating system used, at each location must be same or compatible.  The database application (or DBMS) used at each location must be same or compatible.  It appears to user as a single system  All access is through one, global schema  The global schema is the union of all the local schema
  • 13.
  • 14. Homogeneous Distributed Database Example  A distributed system connects three databases: hq, mfg, and sales  An application can simultaneously access or modify the data in several datab ases in a single distributed environment.
  • 15. Heterogeneous D-DBMS Different sites may use different schema and softw are. Different nodes may have different hardware & sof tware and data structures at various nodes or locat ions are also incompatible. Different computers and operating systems, data base applications or data models may be used at ea ch of the locations. Difficult to manage and design.
  • 17. Distributed Database Design  Three key issues:  Data Fragmentation • Relation may be divided into a number of sub rel ations, which are then distributed. • Breaking up the database into logical units called fragments and assigned for storage at various sit es.  Data Allocation • The process of assigning a particular fragment to a particular site in a distributed system.  Data Replication • Copy of fragment may be maintained at several si
  • 18. Distributed Database Design  Data Fragmentation  data can be distributed by storing individual tables at different sites  data can also be distributed by decomposing a tab le and storing portions at different sites – called Fr agmentation  fragmentation can be horizontal or vertical
  • 19. Horizontal and Vertical Fragmentation
  • 20. Why use Fragmentation?  Usage - in general applications use views so it’s appropri ate to work with subsets  Efficiency - data stored close to where it is most frequentl y used  Parallelism - a transaction can divided into several sub-q ueries to increase degree of concurrency  Security - data more secure - only stored where it is need ed Disadvantages: Performance - may be slower Integrity - more difficult
  • 21. Distributed Database Design  Horizontal Fragmentation  Each fragment, Ti , of table T contains a subset of the rows  Each tuple of T is assigned to one or more fragme nts  Horizontal fragmentation is lossless  A selection condition may be composed of several cond itions connected by AND or OR  Derived horizontal fragmentation: It is the partitioning of a primary relation to other secondary relations which are related with Foreign keys
  • 22. Horizontal Fragmentation Example  A bank account schema has a relation Account-schema = (branch-name, account-number, balance).  It fragments the relation by location and stores each fragment l ocally: rows with branch-name = `Hillside` are stored in the H illside in a fragment
  • 24. Distributed Database Design  Vertical Fragmentation  It is a subset of a relation which is created by a subset of colum ns. Thus a vertical fragment of a relation will contain values of selected columns. There is no selection condition used in verti cal fragmentation.  Consider the customer relation. A vertical fragment can be cre ated by keeping the values of Name, Area, Sex.  Because there is no condition for creating a vertical fragment, e ach fragment must include the primary key attribute of the pare nt relation customer. In this way all vertical fragments of a relati on are connected.
  • 26. Distributed Database Design  Data Allocation  Four alternative strategies regarding placement of data  Centralized  Partitioned (or Fragmented)  Complete Replication  Selective Replication
  • 27. Data Allocation  Centralized  Consists of single database and DBMS stored a t one site with users distributed across the netw ork.  Partitioned  Database partitioned into disjoint fragments, ea ch fragment assigned to one site.  Complete Replication  Consists of maintaining complete copy of datab ase at each site. Selective Replication  Combination of partitioning, replication, and cen tralization.
  • 28. Distributed Database Design  Data Replication  System maintains multiple copies of data, stored i n different sites, for faster retrieval and fault tolera nce.
  • 29. Issues of Replication  Data timeliness – high tolerance for out-of-date data m ay be required  DBMS capabilities – if DBMS cannot support multi-nod e queries, replication may be necessary  Performance implications – refreshing may cause per formance problems for busy nodes  Network heterogeneity – complicates replication  Network communication capabilities – complete refre shes place heavy demand on telecommunications
  • 30. Advantages of Replication  Availability: failure of site containing relation r does not res ult 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 s ite containing a replica of r.
  • 31. Disadvantages of Replication Increased cost of updates: each replica of relation r must be updat ed. Increased complexity of concurrency control: concurrent updates t o distinct replicas may lead to inconsistent data unless special c oncurrency control mechanisms are implemented. One solution: choose one copy as primary copy and apply concurrency c ontrol operations on primary copy.