SlideShare a Scribd company logo
Distributed dbms tutorial
i
AboutthisTutorial
Distributed Database Management System (DDBMS) is a type of DBMS which manages a
number of databases hoisted at diversified locations and interconnected through a
computer network. It provides mechanisms so that the distribution remains oblivious to
the users, who perceive the database as a single database.
This tutorial discusses the important theories of distributed database systems. A number
of illustrations and examples have been provided to aid the students to grasp the intricate
concepts of DDBMS.
Audience
This tutorial has been prepared for students pursuing either a master’s degree or a
bachelor’s degree in Computer Science, particularly if they have opted for distributed
systems or distributed database systems as a subject.
Prerequisites
This tutorial is an advanced topic that focuses of a type of database system. Consequently,
it requires students to have a reasonably good knowledge on the elementary concepts of
DBMS. Besides, an understanding of SQL will be an added advantage.
Copyright&Disclaimer
 Copyright 2016 by Tutorials Point (I) Pvt. Ltd.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish
any contents or a part of contents of this e-book in any manner without written consent
of the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at contact@tutorialspoint.com
ii
TableofContents
About this Tutorial............................................................................................................................................i
Audience...........................................................................................................................................................i
Prerequisites.....................................................................................................................................................i
Copyright & Disclaimer.....................................................................................................................................i
Table of Contents ............................................................................................................................................ ii
PART 1: DDBMS – BASICS............................................................................................................1
1. DDBMS – DBMS Concepts.........................................................................................................................2
Database and Database Management System................................................................................................2
Database Schemas...........................................................................................................................................3
Types of DBMS.................................................................................................................................................3
Operations on DBMS .......................................................................................................................................5
2. DDBMS – Distributed Databases...............................................................................................................8
Distributed Database Management System....................................................................................................8
Factors Encouraging DDBMS ...........................................................................................................................9
Advantages of Distributed Databases .............................................................................................................9
Adversities of Distributed Databases ............................................................................................................10
PART 2: DISTRIBUTED DATABASE DESIGN.................................................................................11
3. DDBMS – Distributed Database Environments........................................................................................12
Types of Distributed Databases.....................................................................................................................12
Distributed DBMS Architectures ...................................................................................................................13
Architectural Models.....................................................................................................................................14
Design Alternatives........................................................................................................................................17
4. DDBMS – Design Strategies.....................................................................................................................19
Data Replication ............................................................................................................................................19
Fragmentation...............................................................................................................................................20
Vertical Fragmentation..................................................................................................................................20
Horizontal Fragmentation .............................................................................................................................21
Hybrid Fragmentation ...................................................................................................................................21
5. DDBMS – Distribution Transparency.......................................................................................................22
Location Transparency ..................................................................................................................................22
Fragmentation Transparency ........................................................................................................................22
Replication Transparency ..............................................................................................................................22
Combination of Transparencies....................................................................................................................23
6. DDBMS – Database Control.....................................................................................................................24
Authentication...............................................................................................................................................24
Access Rights .................................................................................................................................................24
Semantic Integrity Control ............................................................................................................................25
iii
PART 3: QUERY OPTIMIZATION.................................................................................................27
7. DDBMS – Relational Algebra for Query Optimization .............................................................................28
Query Optimization Issues in DDBMS ...........................................................................................................28
Query Processing...........................................................................................................................................28
Relational Algebra .........................................................................................................................................29
Translating SQL Queries into Relational Algebra...........................................................................................32
Computation of Relational Algebra Operators..............................................................................................33
Computation of Selection..............................................................................................................................34
Computation of Joins.....................................................................................................................................34
8. DDBMS – Query Optimization in Centralized Systems.............................................................................36
Query Parsing and Translation ......................................................................................................................36
Approaches to Query Optimization...............................................................................................................38
9. DDBMS – Query Optimization in Distributed Systems.............................................................................39
Distributed Query Processing Architecture...................................................................................................39
Mapping Global Queries into Local Queries..................................................................................................39
Distributed Query Optimization ....................................................................................................................40
PART 4: CONCURRENCY CONTROL............................................................................................43
10. DDBMS – Transaction Processing Systems ..............................................................................................44
Transactions ..................................................................................................................................................44
Transaction Operations .................................................................................................................................44
Transaction States .........................................................................................................................................45
Desirable Properties of Transactions.............................................................................................................45
Schedules and Conflicts.................................................................................................................................46
Serializability..................................................................................................................................................47
11. DDBMS – Controlling Concurrency..........................................................................................................48
Locking Based Concurrency Control Protocols..............................................................................................48
Timestamp Concurrency Control Algorithms ................................................................................................48
Optimistic Concurrency Control Algorithm ...................................................................................................49
Concurrency Control in Distributed Systems.................................................................................................50
12. DDBMS – Deadlock Handling ..................................................................................................................52
What are Deadlocks?.....................................................................................................................................52
Deadlock Handling in Centralized Systems....................................................................................................52
Deadlock Handling in Distributed Systems....................................................................................................54
PART 5: FAILURE AND RECOVERY..............................................................................................57
13. DDBMS – Replication Control..................................................................................................................58
Synchronous Replication Control ..................................................................................................................58
Asynchronous Replication Control ................................................................................................................59
Replication Control Algorithms .....................................................................................................................59
14. DDBMS – Failure & Commit ....................................................................................................................62
Soft Failure ....................................................................................................................................................62
Hard Failure...................................................................................................................................................62
Network Failure.............................................................................................................................................62
iv
Commit Protocols..........................................................................................................................................63
Transaction Log .............................................................................................................................................63
15. DDBMS – Database Recovery..................................................................................................................65
Recovery from Power Failure ........................................................................................................................65
Recovery from Disk Failure............................................................................................................................65
Checkpointing................................................................................................................................................66
Transaction Recovery Using UNDO / REDO...................................................................................................67
16. DDBMS – Distributed Commit Protocols .................................................................................................69
Distributed One-phase Commit.....................................................................................................................69
Distributed Two-phase Commit ....................................................................................................................69
Distributed Three-phase Commit..................................................................................................................70
PART 6: DISTRIBUTED DBMS SECURITY .....................................................................................71
17. DDBMS – Database Security & Cryptography..........................................................................................72
Database Security and Threats......................................................................................................................72
Measures of Control......................................................................................................................................72
What is Cryptography?..................................................................................................................................72
Conventional Encryption Methods................................................................................................................73
Public Key Cryptography................................................................................................................................73
Digital Signatures...........................................................................................................................................74
18. DDBMS – Security in Distributed Databases............................................................................................75
Communications Security..............................................................................................................................75
Data Security .................................................................................................................................................75
Data Auditing.................................................................................................................................................76
5
Part 1: DDBMS – Basics
6
For proper functioning of any organization, there’s a need for a well-maintained database. In
the recent past, databases used to be centralized in nature. However, with the increase in
globalization, organizations tend to be diversified across the globe. They may choose to
distribute data over local servers instead of a central database. Thus, arrived the concept of
Distributed Databases.
This chapter gives an overview of databases and Database Management Systems (DBMS). A
database is an ordered collection of related data. A DBMS is a software package to work upon
a database. A detailed study of DBMS is available in our tutorial named “Learn DBMS”. In this
chapter, we revise the main concepts so that the study of DDBMS can be done with ease. The
three topics covered are database schemas, types of databases and operations on databases.
DatabaseandDatabaseManagementSystem
A database is an ordered collection of related data that is built for a specific purpose. A
database may be organized as a collection of multiple tables, where a table represents a real
world element or entity. Each table has several different fields that represent the characteristic
features of the entity.
For example, a company database may include tables for projects, employees, departments,
products and financial records. The fields in the Employee table may be Name, Company_Id,
Date_of_Joining, and so forth.
A database management system is a collection of programs that enables creation and
maintenance of a database. DBMS is available as a software package that facilitates definition,
construction, manipulation and sharing of data in a database. Definition of a database includes
description of the structure of a database. Construction of a database involves actual storing
of the data in any storage medium. Manipulation refers to the retrieving information from the
database, updating the database and generating reports. Sharing of data facilitates data to
be accessed by different users or programs.
Examples of DBMS Application Areas
 Automatic Teller Machines
 Train Reservation System
 Employee Management System
 Student Information System
1. DDBMS – DBMS CONCEPTS
7
Examples of DBMS Packages
 MySQL
 Oracle
 SQL Server
 dBASE
 FoxPro
 PostgreSQL, etc.
DatabaseSchemas
A database schema is a description of the database which is specified during database design
and subject to infrequent alterations. It defines the organization of the data, the relationships
among them, and the constraints associated with them.
Databases are often represented through the three-schema architecture or ANSI-SPARC
architecture. The goal of this architecture is to separate the user application from the
physical database. The three levels are:
 Internal Level having Internal Schema – It describes the physical structure, details
of internal storage and access paths for the database.
 Conceptual Level having Conceptual Schema – It describes the structure of the
whole database while hiding the details of physical storage of data. This illustrates the
entities, attributes with their data types and constraints, user operations and
relationships.
 External or View Level having External Schemas or Views – It describes the
portion of a database relevant to a particular user or a group of users while hiding the
rest of database.
TypesofDBMS
There are four types of DBMS.
Hierarchical DBMS
In hierarchical DBMS, the relationships among data in the database are established so that
one data element exists as a subordinate of another. The data elements have parent-child
relationships and are modelled using the “tree” data structure. These are very fast and simple.
8
Network DBMS
Network DBMS in one where the relationships among data in the database are of type many-
to-many in the form of a network. The structure is generally complicated due to the existence
of numerous many-to-many relationships. Network DBMS is modelled using “graph” data
structure.
`
Relational DBMS
In relational databases, the database is represented in the form of relations. Each relation
models an entity and is represented as a table of values. In the relation or table, a row is
called a tuple and denotes a single record. A column is called a field or an attribute and
denotes a characteristic property of the entity. RDBMS is the most popular database
management system.
For example: A Student Relation
Field
S_Id Name Year Stream
Hierarchical DBMS
Network DBMS
9
Tuple 1 Ankit Jha 1 Computer Science
2 Pushpa Mishra 2 Electronics
5 Ranjini Iyer 2 Computer Science
Object Oriented DBMS
Object-oriented DBMS is derived from the model of the object-oriented programming
paradigm. They are helpful in representing both consistent data as stored in databases, as
well as transient data, as found in executing programs. They use small, reusable elements
called objects. Each object contains a data part and a set of operations which works upon the
data. The object and its attributes are accessed through pointers instead of being stored in
relational table models.
For example: A simplified Bank Account object-oriented database –
Distributed DBMS
A distributed database is a set of interconnected databases that is distributed over the
computer network or internet. A Distributed Database Management System (DDBMS)
manages the distributed database and provides mechanisms so as to make the databases
transparent to the users. In these systems, data is intentionally distributed among multiple
nodes so that all computing resources of the organization can be optimally used.
OperationsonDBMS
The four basic operations on a database are Create, Retrieve, Update and Delete.
 CREATE database structure and populate it with data – Creation of a database relation
involves specifying the data structures, data types and the constraints of the data to
be stored.
Example: SQL command to create a student table:
CREATE TABLE STUDENT
(
Bank_Account
Acc_No
Balance
debitAmount( )
creditAmount( )
getBalance( )
Customer
Cust_ID
Name
Address
Phone
0 ..*
10
ROLL INTEGER PRIMARY KEY,
NAME VARCHAR2(25),
YEAR INTEGER,
STREAM VARCHAR2(10)
);
Once the data format is defined, the actual data is stored in accordance with the format
in some storage medium.
11
End of ebook preview
If you liked what you saw…
Buy it from our store @ https://store.tutorialspoint
Ad

More Related Content

What's hot (14)

Cdma tutorial
Cdma tutorialCdma tutorial
Cdma tutorial
HarikaReddy115
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorial
Edress Oryakhail
 
Intellij idea tutorial
Intellij idea tutorialIntellij idea tutorial
Intellij idea tutorial
HarikaReddy115
 
Mybatis tutorial
Mybatis tutorialMybatis tutorial
Mybatis tutorial
Alex Roldán
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
Vinay H G
 
Mongodb tutorial
Mongodb tutorialMongodb tutorial
Mongodb tutorial
Ashoka Vanjare
 
Mj example case_study_layout_intro_completedq
Mj example case_study_layout_intro_completedqMj example case_study_layout_intro_completedq
Mj example case_study_layout_intro_completedq
hccit
 
computer science internship report
computer science  internship reportcomputer science  internship report
computer science internship report
kaahwa Armstrong
 
Instructor Manual
Instructor ManualInstructor Manual
Instructor Manual
Christine Gonnella
 
CETS 2010, Dannette Nicastro & Christine O'Malley, Participant Guide for Crea...
CETS 2010, Dannette Nicastro & Christine O'Malley, Participant Guide for Crea...CETS 2010, Dannette Nicastro & Christine O'Malley, Participant Guide for Crea...
CETS 2010, Dannette Nicastro & Christine O'Malley, Participant Guide for Crea...
Chicago eLearning & Technology Showcase
 
Hrms
HrmsHrms
Hrms
cvale78
 
Intrepid Selectinglms 414
Intrepid Selectinglms 414Intrepid Selectinglms 414
Intrepid Selectinglms 414
Hidayathulla NS
 
Computer management (HND in Networking)
Computer management (HND in Networking)Computer management (HND in Networking)
Computer management (HND in Networking)
L.Naresh Naresh
 
Training Report
Training ReportTraining Report
Training Report
Maninda Edirisooriya
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorial
Edress Oryakhail
 
Intellij idea tutorial
Intellij idea tutorialIntellij idea tutorial
Intellij idea tutorial
HarikaReddy115
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
Vinay H G
 
Mj example case_study_layout_intro_completedq
Mj example case_study_layout_intro_completedqMj example case_study_layout_intro_completedq
Mj example case_study_layout_intro_completedq
hccit
 
computer science internship report
computer science  internship reportcomputer science  internship report
computer science internship report
kaahwa Armstrong
 
CETS 2010, Dannette Nicastro & Christine O'Malley, Participant Guide for Crea...
CETS 2010, Dannette Nicastro & Christine O'Malley, Participant Guide for Crea...CETS 2010, Dannette Nicastro & Christine O'Malley, Participant Guide for Crea...
CETS 2010, Dannette Nicastro & Christine O'Malley, Participant Guide for Crea...
Chicago eLearning & Technology Showcase
 
Intrepid Selectinglms 414
Intrepid Selectinglms 414Intrepid Selectinglms 414
Intrepid Selectinglms 414
Hidayathulla NS
 
Computer management (HND in Networking)
Computer management (HND in Networking)Computer management (HND in Networking)
Computer management (HND in Networking)
L.Naresh Naresh
 

Similar to Distributed dbms tutorial (20)

Database Management System Tutorial
Database Management System TutorialDatabase Management System Tutorial
Database Management System Tutorial
YeonYuRae
 
Dbms tutorial2020
Dbms tutorial2020Dbms tutorial2020
Dbms tutorial2020
Scada Ucv
 
Dbms tutorial
Dbms tutorialDbms tutorial
Dbms tutorial
SebatiLourembam
 
redis_tutoria0l for new learners step from scratch.pdf
redis_tutoria0l for new learners step from scratch.pdfredis_tutoria0l for new learners step from scratch.pdf
redis_tutoria0l for new learners step from scratch.pdf
BharathiRaja981061
 
Data communication computer_network_tutorial
Data communication computer_network_tutorialData communication computer_network_tutorial
Data communication computer_network_tutorial
MuhammadAsadKhan46
 
data_communication_computer_network_tutorial.pdf
data_communication_computer_network_tutorial.pdfdata_communication_computer_network_tutorial.pdf
data_communication_computer_network_tutorial.pdf
GiftGrace
 
Data communication computer_network_tutorial
Data communication computer_network_tutorialData communication computer_network_tutorial
Data communication computer_network_tutorial
Maulen Bale
 
css_tutorial PD: Generate, view, or edit PDFs in web apps.
css_tutorial PD: Generate, view, or edit PDFs in web apps.css_tutorial PD: Generate, view, or edit PDFs in web apps.
css_tutorial PD: Generate, view, or edit PDFs in web apps.
helloraja
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
HarikaReddy115
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
arun_kumar_singh
 
D3js tutorial
D3js tutorialD3js tutorial
D3js tutorial
HarikaReddy115
 
Asp.net mvc tutorial
Asp.net mvc tutorialAsp.net mvc tutorial
Asp.net mvc tutorial
HarikaReddy115
 
Chef tutorial
Chef tutorialChef tutorial
Chef tutorial
HarikaReddy115
 
Chef tutorial
Chef tutorialChef tutorial
Chef tutorial
HarikaReddy115
 
Wordpress tutorial- Excel Range
Wordpress tutorial- Excel RangeWordpress tutorial- Excel Range
Wordpress tutorial- Excel Range
jasikadogra
 
Wordpress tutorial - Excelrange
Wordpress tutorial - ExcelrangeWordpress tutorial - Excelrange
Wordpress tutorial - Excelrange
jasikadogra
 
Dynamodb tutorial
Dynamodb tutorialDynamodb tutorial
Dynamodb tutorial
HarikaReddy115
 
Behavior driven development_tutorial
Behavior driven development_tutorialBehavior driven development_tutorial
Behavior driven development_tutorial
HarikaReddy115
 
Learn embedded systems tutorial
Learn embedded systems tutorialLearn embedded systems tutorial
Learn embedded systems tutorial
Ashoka Vanjare
 
Supply chain management_tutorial
Supply chain management_tutorialSupply chain management_tutorial
Supply chain management_tutorial
RenuSwarnkar1
 
Database Management System Tutorial
Database Management System TutorialDatabase Management System Tutorial
Database Management System Tutorial
YeonYuRae
 
Dbms tutorial2020
Dbms tutorial2020Dbms tutorial2020
Dbms tutorial2020
Scada Ucv
 
redis_tutoria0l for new learners step from scratch.pdf
redis_tutoria0l for new learners step from scratch.pdfredis_tutoria0l for new learners step from scratch.pdf
redis_tutoria0l for new learners step from scratch.pdf
BharathiRaja981061
 
Data communication computer_network_tutorial
Data communication computer_network_tutorialData communication computer_network_tutorial
Data communication computer_network_tutorial
MuhammadAsadKhan46
 
data_communication_computer_network_tutorial.pdf
data_communication_computer_network_tutorial.pdfdata_communication_computer_network_tutorial.pdf
data_communication_computer_network_tutorial.pdf
GiftGrace
 
Data communication computer_network_tutorial
Data communication computer_network_tutorialData communication computer_network_tutorial
Data communication computer_network_tutorial
Maulen Bale
 
css_tutorial PD: Generate, view, or edit PDFs in web apps.
css_tutorial PD: Generate, view, or edit PDFs in web apps.css_tutorial PD: Generate, view, or edit PDFs in web apps.
css_tutorial PD: Generate, view, or edit PDFs in web apps.
helloraja
 
Wordpress tutorial- Excel Range
Wordpress tutorial- Excel RangeWordpress tutorial- Excel Range
Wordpress tutorial- Excel Range
jasikadogra
 
Wordpress tutorial - Excelrange
Wordpress tutorial - ExcelrangeWordpress tutorial - Excelrange
Wordpress tutorial - Excelrange
jasikadogra
 
Behavior driven development_tutorial
Behavior driven development_tutorialBehavior driven development_tutorial
Behavior driven development_tutorial
HarikaReddy115
 
Learn embedded systems tutorial
Learn embedded systems tutorialLearn embedded systems tutorial
Learn embedded systems tutorial
Ashoka Vanjare
 
Supply chain management_tutorial
Supply chain management_tutorialSupply chain management_tutorial
Supply chain management_tutorial
RenuSwarnkar1
 
Ad

More from HarikaReddy115 (20)

Data structures algorithms_tutorial
Data structures algorithms_tutorialData structures algorithms_tutorial
Data structures algorithms_tutorial
HarikaReddy115
 
Cosmology tutorial
Cosmology tutorialCosmology tutorial
Cosmology tutorial
HarikaReddy115
 
Control systems tutorial
Control systems tutorialControl systems tutorial
Control systems tutorial
HarikaReddy115
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorial
HarikaReddy115
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorial
HarikaReddy115
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorial
HarikaReddy115
 
Communication technologies tutorial
Communication technologies tutorialCommunication technologies tutorial
Communication technologies tutorial
HarikaReddy115
 
Biometrics tutorial
Biometrics tutorialBiometrics tutorial
Biometrics tutorial
HarikaReddy115
 
Basics of computers_tutorial
Basics of computers_tutorialBasics of computers_tutorial
Basics of computers_tutorial
HarikaReddy115
 
Basics of computer_science_tutorial
Basics of computer_science_tutorialBasics of computer_science_tutorial
Basics of computer_science_tutorial
HarikaReddy115
 
Basic electronics tutorial
Basic electronics tutorialBasic electronics tutorial
Basic electronics tutorial
HarikaReddy115
 
Auditing tutorial
Auditing tutorialAuditing tutorial
Auditing tutorial
HarikaReddy115
 
Artificial neural network_tutorial
Artificial neural network_tutorialArtificial neural network_tutorial
Artificial neural network_tutorial
HarikaReddy115
 
Artificial intelligence tutorial
Artificial intelligence tutorialArtificial intelligence tutorial
Artificial intelligence tutorial
HarikaReddy115
 
Antenna theory tutorial
Antenna theory tutorialAntenna theory tutorial
Antenna theory tutorial
HarikaReddy115
 
Analog communication tutorial
Analog communication tutorialAnalog communication tutorial
Analog communication tutorial
HarikaReddy115
 
Amplifiers tutorial
Amplifiers tutorialAmplifiers tutorial
Amplifiers tutorial
HarikaReddy115
 
Agile tutorial
Agile tutorialAgile tutorial
Agile tutorial
HarikaReddy115
 
Accounting basics tutorial
Accounting basics tutorialAccounting basics tutorial
Accounting basics tutorial
HarikaReddy115
 
Ruby tutorial
Ruby tutorialRuby tutorial
Ruby tutorial
HarikaReddy115
 
Data structures algorithms_tutorial
Data structures algorithms_tutorialData structures algorithms_tutorial
Data structures algorithms_tutorial
HarikaReddy115
 
Control systems tutorial
Control systems tutorialControl systems tutorial
Control systems tutorial
HarikaReddy115
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorial
HarikaReddy115
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorial
HarikaReddy115
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorial
HarikaReddy115
 
Communication technologies tutorial
Communication technologies tutorialCommunication technologies tutorial
Communication technologies tutorial
HarikaReddy115
 
Basics of computers_tutorial
Basics of computers_tutorialBasics of computers_tutorial
Basics of computers_tutorial
HarikaReddy115
 
Basics of computer_science_tutorial
Basics of computer_science_tutorialBasics of computer_science_tutorial
Basics of computer_science_tutorial
HarikaReddy115
 
Basic electronics tutorial
Basic electronics tutorialBasic electronics tutorial
Basic electronics tutorial
HarikaReddy115
 
Artificial neural network_tutorial
Artificial neural network_tutorialArtificial neural network_tutorial
Artificial neural network_tutorial
HarikaReddy115
 
Artificial intelligence tutorial
Artificial intelligence tutorialArtificial intelligence tutorial
Artificial intelligence tutorial
HarikaReddy115
 
Antenna theory tutorial
Antenna theory tutorialAntenna theory tutorial
Antenna theory tutorial
HarikaReddy115
 
Analog communication tutorial
Analog communication tutorialAnalog communication tutorial
Analog communication tutorial
HarikaReddy115
 
Accounting basics tutorial
Accounting basics tutorialAccounting basics tutorial
Accounting basics tutorial
HarikaReddy115
 
Ad

Recently uploaded (20)

CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Sugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptxSugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptx
Dr. Renu Jangid
 
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
National Information Standards Organization (NISO)
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18
Celine George
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Contact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: OptometryContact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: Optometry
MushahidRaza8
 
"Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules""Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules"
rupalinirmalbpharm
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
APM Midlands Region April 2025 Sacha Hind Circulated.pdf
APM Midlands Region April 2025 Sacha Hind Circulated.pdfAPM Midlands Region April 2025 Sacha Hind Circulated.pdf
APM Midlands Region April 2025 Sacha Hind Circulated.pdf
Association for Project Management
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Sugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptxSugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptx
Dr. Renu Jangid
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFAExercise Physiology MCQS By DR. NASIR MUSTAFA
Exercise Physiology MCQS By DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18How to Manage Purchase Alternatives in Odoo 18
How to Manage Purchase Alternatives in Odoo 18
Celine George
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
Contact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: OptometryContact Lens:::: An Overview.pptx.: Optometry
Contact Lens:::: An Overview.pptx.: Optometry
MushahidRaza8
 
"Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules""Basics of Heterocyclic Compounds and Their Naming Rules"
"Basics of Heterocyclic Compounds and Their Naming Rules"
rupalinirmalbpharm
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
BỘ ĐỀ TUYỂN SINH VÀO LỚP 10 TIẾNG ANH - 25 ĐỀ THI BÁM SÁT CẤU TRÚC MỚI NHẤT, ...
Nguyen Thanh Tu Collection
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 

Distributed dbms tutorial

  • 2. i AboutthisTutorial Distributed Database Management System (DDBMS) is a type of DBMS which manages a number of databases hoisted at diversified locations and interconnected through a computer network. It provides mechanisms so that the distribution remains oblivious to the users, who perceive the database as a single database. This tutorial discusses the important theories of distributed database systems. A number of illustrations and examples have been provided to aid the students to grasp the intricate concepts of DDBMS. Audience This tutorial has been prepared for students pursuing either a master’s degree or a bachelor’s degree in Computer Science, particularly if they have opted for distributed systems or distributed database systems as a subject. Prerequisites This tutorial is an advanced topic that focuses of a type of database system. Consequently, it requires students to have a reasonably good knowledge on the elementary concepts of DBMS. Besides, an understanding of SQL will be an added advantage. Copyright&Disclaimer  Copyright 2016 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected]
  • 3. ii TableofContents About this Tutorial............................................................................................................................................i Audience...........................................................................................................................................................i Prerequisites.....................................................................................................................................................i Copyright & Disclaimer.....................................................................................................................................i Table of Contents ............................................................................................................................................ ii PART 1: DDBMS – BASICS............................................................................................................1 1. DDBMS – DBMS Concepts.........................................................................................................................2 Database and Database Management System................................................................................................2 Database Schemas...........................................................................................................................................3 Types of DBMS.................................................................................................................................................3 Operations on DBMS .......................................................................................................................................5 2. DDBMS – Distributed Databases...............................................................................................................8 Distributed Database Management System....................................................................................................8 Factors Encouraging DDBMS ...........................................................................................................................9 Advantages of Distributed Databases .............................................................................................................9 Adversities of Distributed Databases ............................................................................................................10 PART 2: DISTRIBUTED DATABASE DESIGN.................................................................................11 3. DDBMS – Distributed Database Environments........................................................................................12 Types of Distributed Databases.....................................................................................................................12 Distributed DBMS Architectures ...................................................................................................................13 Architectural Models.....................................................................................................................................14 Design Alternatives........................................................................................................................................17 4. DDBMS – Design Strategies.....................................................................................................................19 Data Replication ............................................................................................................................................19 Fragmentation...............................................................................................................................................20 Vertical Fragmentation..................................................................................................................................20 Horizontal Fragmentation .............................................................................................................................21 Hybrid Fragmentation ...................................................................................................................................21 5. DDBMS – Distribution Transparency.......................................................................................................22 Location Transparency ..................................................................................................................................22 Fragmentation Transparency ........................................................................................................................22 Replication Transparency ..............................................................................................................................22 Combination of Transparencies....................................................................................................................23 6. DDBMS – Database Control.....................................................................................................................24 Authentication...............................................................................................................................................24 Access Rights .................................................................................................................................................24 Semantic Integrity Control ............................................................................................................................25
  • 4. iii PART 3: QUERY OPTIMIZATION.................................................................................................27 7. DDBMS – Relational Algebra for Query Optimization .............................................................................28 Query Optimization Issues in DDBMS ...........................................................................................................28 Query Processing...........................................................................................................................................28 Relational Algebra .........................................................................................................................................29 Translating SQL Queries into Relational Algebra...........................................................................................32 Computation of Relational Algebra Operators..............................................................................................33 Computation of Selection..............................................................................................................................34 Computation of Joins.....................................................................................................................................34 8. DDBMS – Query Optimization in Centralized Systems.............................................................................36 Query Parsing and Translation ......................................................................................................................36 Approaches to Query Optimization...............................................................................................................38 9. DDBMS – Query Optimization in Distributed Systems.............................................................................39 Distributed Query Processing Architecture...................................................................................................39 Mapping Global Queries into Local Queries..................................................................................................39 Distributed Query Optimization ....................................................................................................................40 PART 4: CONCURRENCY CONTROL............................................................................................43 10. DDBMS – Transaction Processing Systems ..............................................................................................44 Transactions ..................................................................................................................................................44 Transaction Operations .................................................................................................................................44 Transaction States .........................................................................................................................................45 Desirable Properties of Transactions.............................................................................................................45 Schedules and Conflicts.................................................................................................................................46 Serializability..................................................................................................................................................47 11. DDBMS – Controlling Concurrency..........................................................................................................48 Locking Based Concurrency Control Protocols..............................................................................................48 Timestamp Concurrency Control Algorithms ................................................................................................48 Optimistic Concurrency Control Algorithm ...................................................................................................49 Concurrency Control in Distributed Systems.................................................................................................50 12. DDBMS – Deadlock Handling ..................................................................................................................52 What are Deadlocks?.....................................................................................................................................52 Deadlock Handling in Centralized Systems....................................................................................................52 Deadlock Handling in Distributed Systems....................................................................................................54 PART 5: FAILURE AND RECOVERY..............................................................................................57 13. DDBMS – Replication Control..................................................................................................................58 Synchronous Replication Control ..................................................................................................................58 Asynchronous Replication Control ................................................................................................................59 Replication Control Algorithms .....................................................................................................................59 14. DDBMS – Failure & Commit ....................................................................................................................62 Soft Failure ....................................................................................................................................................62 Hard Failure...................................................................................................................................................62 Network Failure.............................................................................................................................................62
  • 5. iv Commit Protocols..........................................................................................................................................63 Transaction Log .............................................................................................................................................63 15. DDBMS – Database Recovery..................................................................................................................65 Recovery from Power Failure ........................................................................................................................65 Recovery from Disk Failure............................................................................................................................65 Checkpointing................................................................................................................................................66 Transaction Recovery Using UNDO / REDO...................................................................................................67 16. DDBMS – Distributed Commit Protocols .................................................................................................69 Distributed One-phase Commit.....................................................................................................................69 Distributed Two-phase Commit ....................................................................................................................69 Distributed Three-phase Commit..................................................................................................................70 PART 6: DISTRIBUTED DBMS SECURITY .....................................................................................71 17. DDBMS – Database Security & Cryptography..........................................................................................72 Database Security and Threats......................................................................................................................72 Measures of Control......................................................................................................................................72 What is Cryptography?..................................................................................................................................72 Conventional Encryption Methods................................................................................................................73 Public Key Cryptography................................................................................................................................73 Digital Signatures...........................................................................................................................................74 18. DDBMS – Security in Distributed Databases............................................................................................75 Communications Security..............................................................................................................................75 Data Security .................................................................................................................................................75 Data Auditing.................................................................................................................................................76
  • 6. 5 Part 1: DDBMS – Basics
  • 7. 6 For proper functioning of any organization, there’s a need for a well-maintained database. In the recent past, databases used to be centralized in nature. However, with the increase in globalization, organizations tend to be diversified across the globe. They may choose to distribute data over local servers instead of a central database. Thus, arrived the concept of Distributed Databases. This chapter gives an overview of databases and Database Management Systems (DBMS). A database is an ordered collection of related data. A DBMS is a software package to work upon a database. A detailed study of DBMS is available in our tutorial named “Learn DBMS”. In this chapter, we revise the main concepts so that the study of DDBMS can be done with ease. The three topics covered are database schemas, types of databases and operations on databases. DatabaseandDatabaseManagementSystem A database is an ordered collection of related data that is built for a specific purpose. A database may be organized as a collection of multiple tables, where a table represents a real world element or entity. Each table has several different fields that represent the characteristic features of the entity. For example, a company database may include tables for projects, employees, departments, products and financial records. The fields in the Employee table may be Name, Company_Id, Date_of_Joining, and so forth. A database management system is a collection of programs that enables creation and maintenance of a database. DBMS is available as a software package that facilitates definition, construction, manipulation and sharing of data in a database. Definition of a database includes description of the structure of a database. Construction of a database involves actual storing of the data in any storage medium. Manipulation refers to the retrieving information from the database, updating the database and generating reports. Sharing of data facilitates data to be accessed by different users or programs. Examples of DBMS Application Areas  Automatic Teller Machines  Train Reservation System  Employee Management System  Student Information System 1. DDBMS – DBMS CONCEPTS
  • 8. 7 Examples of DBMS Packages  MySQL  Oracle  SQL Server  dBASE  FoxPro  PostgreSQL, etc. DatabaseSchemas A database schema is a description of the database which is specified during database design and subject to infrequent alterations. It defines the organization of the data, the relationships among them, and the constraints associated with them. Databases are often represented through the three-schema architecture or ANSI-SPARC architecture. The goal of this architecture is to separate the user application from the physical database. The three levels are:  Internal Level having Internal Schema – It describes the physical structure, details of internal storage and access paths for the database.  Conceptual Level having Conceptual Schema – It describes the structure of the whole database while hiding the details of physical storage of data. This illustrates the entities, attributes with their data types and constraints, user operations and relationships.  External or View Level having External Schemas or Views – It describes the portion of a database relevant to a particular user or a group of users while hiding the rest of database. TypesofDBMS There are four types of DBMS. Hierarchical DBMS In hierarchical DBMS, the relationships among data in the database are established so that one data element exists as a subordinate of another. The data elements have parent-child relationships and are modelled using the “tree” data structure. These are very fast and simple.
  • 9. 8 Network DBMS Network DBMS in one where the relationships among data in the database are of type many- to-many in the form of a network. The structure is generally complicated due to the existence of numerous many-to-many relationships. Network DBMS is modelled using “graph” data structure. ` Relational DBMS In relational databases, the database is represented in the form of relations. Each relation models an entity and is represented as a table of values. In the relation or table, a row is called a tuple and denotes a single record. A column is called a field or an attribute and denotes a characteristic property of the entity. RDBMS is the most popular database management system. For example: A Student Relation Field S_Id Name Year Stream Hierarchical DBMS Network DBMS
  • 10. 9 Tuple 1 Ankit Jha 1 Computer Science 2 Pushpa Mishra 2 Electronics 5 Ranjini Iyer 2 Computer Science Object Oriented DBMS Object-oriented DBMS is derived from the model of the object-oriented programming paradigm. They are helpful in representing both consistent data as stored in databases, as well as transient data, as found in executing programs. They use small, reusable elements called objects. Each object contains a data part and a set of operations which works upon the data. The object and its attributes are accessed through pointers instead of being stored in relational table models. For example: A simplified Bank Account object-oriented database – Distributed DBMS A distributed database is a set of interconnected databases that is distributed over the computer network or internet. A Distributed Database Management System (DDBMS) manages the distributed database and provides mechanisms so as to make the databases transparent to the users. In these systems, data is intentionally distributed among multiple nodes so that all computing resources of the organization can be optimally used. OperationsonDBMS The four basic operations on a database are Create, Retrieve, Update and Delete.  CREATE database structure and populate it with data – Creation of a database relation involves specifying the data structures, data types and the constraints of the data to be stored. Example: SQL command to create a student table: CREATE TABLE STUDENT ( Bank_Account Acc_No Balance debitAmount( ) creditAmount( ) getBalance( ) Customer Cust_ID Name Address Phone 0 ..*
  • 11. 10 ROLL INTEGER PRIMARY KEY, NAME VARCHAR2(25), YEAR INTEGER, STREAM VARCHAR2(10) ); Once the data format is defined, the actual data is stored in accordance with the format in some storage medium.
  • 12. 11 End of ebook preview If you liked what you saw… Buy it from our store @ https://store.tutorialspoint