The document discusses distributed database systems. It defines distributed databases as consisting of loosely coupled sites that share no physical components but appear as a single system to users. Processing can occur at sites other than where requests originate. The key aspects covered are:
- Distributed databases connect multiple independent databases that cooperate to process requests.
- Heterogeneous distributed databases can use different schemas and software, complicating query and transaction processing.
- Data can be distributed through replication of copies across sites or fragmentation of relations into portions stored at different sites.
- Commit protocols like two-phase commit are used to ensure atomicity of transactions occurring across multiple sites in distributed databases.
TCP/IP have 5 layers, whereas OSI model have 7 layers in its Model. TCP/IP is known for the secured connection and comunication. I have explained all functions and definitions of layers in TCP/IP Model
This presentation several topics of subjects RDBMS and DBMS including Distributed Database Design,Architecture of Distributed database processing system,Data Communication concept,Concurrency control and recovery. All the topics are briefly described according to syllabus of BCA II and BCA III year subjects.
Transactions and Concurrency Control in distributed systems. Transaction properties, classification, and transaction implementation. Flat, Nested, and Distributed transactions. Inconsistent Retrievals, Lost Update, Dirty Read, and Premature Writes Problem
TCP/IP have 5 layers, whereas OSI model have 7 layers in its Model. TCP/IP is known for the secured connection and comunication. I have explained all functions and definitions of layers in TCP/IP Model
This presentation several topics of subjects RDBMS and DBMS including Distributed Database Design,Architecture of Distributed database processing system,Data Communication concept,Concurrency control and recovery. All the topics are briefly described according to syllabus of BCA II and BCA III year subjects.
Transactions and Concurrency Control in distributed systems. Transaction properties, classification, and transaction implementation. Flat, Nested, and Distributed transactions. Inconsistent Retrievals, Lost Update, Dirty Read, and Premature Writes Problem
Real Life Applications of Distributed Systems:
1. Distributed Rendering in Computer Graphics
2. Peer-To-Peer Networks
3. Massively Multiplayer Online Gaming
A Distributed File System(DFS) is simply a classical model of a file system distributed across multiple machines.The purpose is to promote sharing of dispersed files.
Distribution transparency and Distributed transactionshraddha mane
Distribution transparency and Distributed transaction.deadlock detection .Distributed transaction and their types and threads and processes and their difference.
The data link layer, or layer 2, is the second layer of the seven-layer OSI model of computer networking. This layer is the protocol layer that transfers data between adjacent network nodes in a wide area network (WAN) or between nodes on the same local area network (LAN) segment.
A distributed system is a collection of computational and storage devices connected through a communications network. In this type of system, data, software, and users are distributed.
Describe the non linear dynamic pipeline concepts, Creation of reservation table from non-linear pipeline architecture, creation of collision vector from reservation table, generation of state diagram, derivation of simple cycles, greedy cycles and MAL(Minimum Average Latency)
Transaction is a unit of program execution that accesses and possibly updates various data items.
Usually, a transaction is initiated by a user program written in a high-level data-manipulation language or programming language (for example, SQL,COBOL, C, C++, or Java), where it is delimited by statements (or function calls) of the form begin transaction and end transaction.
Real Life Applications of Distributed Systems:
1. Distributed Rendering in Computer Graphics
2. Peer-To-Peer Networks
3. Massively Multiplayer Online Gaming
A Distributed File System(DFS) is simply a classical model of a file system distributed across multiple machines.The purpose is to promote sharing of dispersed files.
Distribution transparency and Distributed transactionshraddha mane
Distribution transparency and Distributed transaction.deadlock detection .Distributed transaction and their types and threads and processes and their difference.
The data link layer, or layer 2, is the second layer of the seven-layer OSI model of computer networking. This layer is the protocol layer that transfers data between adjacent network nodes in a wide area network (WAN) or between nodes on the same local area network (LAN) segment.
A distributed system is a collection of computational and storage devices connected through a communications network. In this type of system, data, software, and users are distributed.
Describe the non linear dynamic pipeline concepts, Creation of reservation table from non-linear pipeline architecture, creation of collision vector from reservation table, generation of state diagram, derivation of simple cycles, greedy cycles and MAL(Minimum Average Latency)
Transaction is a unit of program execution that accesses and possibly updates various data items.
Usually, a transaction is initiated by a user program written in a high-level data-manipulation language or programming language (for example, SQL,COBOL, C, C++, or Java), where it is delimited by statements (or function calls) of the form begin transaction and end transaction.
ACID properties
Atomicity, Consistency, Isolation, Durability
Transactions should possess several properties, often called the ACID properties; they should be enforced by the concurrency control and recovery methods of the DBMS.
Distributed database system is collection of loosely coupled sites that are independeant of each other.
Distributed transaction model
Concurrency control
2 phase commit protocol
Introduction to transaction processing concepts and theoryZainab Almugbel
Modified version of Chapter 21 of the book Fundamentals_of_Database_Systems,_6th_Edition with review questions
as part of database management system course
Distributed Database Introduction
TYPES OF DD:
1. HOMOGENEOUS DISTRIBUTED DATABASE
2. HETEROGENEOUS DISTRIBUTED DATABASE
Distributed DBMS Architectures
Architectural Models
Some of the common architectural models are −
● Client - Server Architecture for DDBMS
● Peer - to - Peer Architecture for DDBMS
● Multi - DBMS Architecture
Design issues of distributed system –
1. Complex nature :
Distributed Databases are a network of many computers present at different locations and they provide an outstanding level of performance,
availability, and of course reliability. Therefore, the nature of Distributed DBMS is comparatively more complex than a centralized DBMS. Complex
software is required for Distributed DBMS. Also, It ensures no data replication, which adds even more complexity in its nature.
2. Overall Cost :
Various costs such as maintenance cost, procurement cost, hardware cost, network/communication costs, labor costs, etc, adds up to the overall
cost and make it costlier than normal DBMS.
3. Security issues:
In a Distributed Database, along with maintaining no data redundancy, the security of data as well as a network is a prime concern. A network can be
easily attacked for data theft and misuse.
4. Integrity Control:
In a vast Distributed database system, maintaining data consistency is important. All changes made to data at one site must be reflected on all the
sites. The communication and processing cost is high in Distributed DBMS in order to enforce the integrity of data.
5. Lacking Standards:
Although it provides effective communication and data sharing, still there are no standard rules and protocols to convert a centralized DBMS to a
large Distributed DBMS. Lack of standards decreases the potential of Distributed DBMS.
6. Lack of Professional Support:
Due to a lack of adequate communication standards, it is not possible to link different equipment produced by different vendors into a smoothly
functioning network. Thu several good resources may not be available to the users of the network.
7. Data design complex:
Fragmentation
Similar to Distributed databases,types of database (20)
2. A distributed database system consists of
loosely coupled sites that share no physical
component
Appears to user as a single system
Database systems that run on each site are
independent of each other
Processing maybe done at a site other than the
initiator of request
3. All sites have identical software
They are aware of each other and agree to cooperate in
processing user requests
It appears to user as a single system
4. A distributed system connects three databases: hq, mfg, and sales
An application can simultaneously access or modify the data in several
databases in a single distributed environment.
5. In a heterogeneous distributed
database system, at least one of the
databases uses different schemas and
software.
A database system having different schema may cause a
major problem for query processing.
A database system having different software may cause a
major problem for transaction processing.
6. Replication
◦ System maintains multiple copies of data, stored in
different sites, for faster retrieval and fault tolerance.
Fragmentation
◦ Relation is partitioned into several fragments stored in
distinct sites
Replication and fragmentation can be combined
• Relation is partitioned into several fragments: system
maintains several identical replicas of each such
fragment.
7. Availability: failure of site containing relation r does
not result in unavailability of r is replicas exist.
Parallelism: queries on r may be processed by several
nodes in parallel.
Reduced data transfer: relation r is available locally
at each site containing a replica of r.
8. Increased cost of updates: each replica of relation r
must be updated.
Increased complexity of concurrency control:
concurrent updates to distinct replicas may lead to
inconsistent data unless special concurrency control
mechanisms are implemented.
One solution: choose one copy as primary copy and apply
concurrency control operations on primary copy.
9. Data can be distributed by storing individual
tables at different sites
Data can also be distributed by decomposing a
table and storing portions at different sites –
called Fragmentation
Fragmentation can be horizontal or vertical
10. Usage - in general applications use views so it’s appropriate to
work with subsets
Efficiency - data stored close to where it is most frequently used
Parallelism - a transaction can divided into several sub-queries to
increase degree of concurrency
Security - data more secure - only stored where it is needed
Disadvantages:
Performance - may be slower
Integrity - more difficult
11. Each fragment, Ti , of table T contains a
subset of the rows
Each tuple of T is assigned to one or more
fragments.
Horizontal fragmentation is lossless
12. A bank account schema has a relation
Account-schema = (branch-name, account-number, balance).
It fragments the relation by location and stores each fragment
locally: rows with branch-name = `Hillside` are stored in the Hillside
in a fragment
13. Each fragment, Ti, of T contains a subset of the
columns, each column is in at least one fragment,
and each fragment includes the key:
Ti = Πattr_listi
(T)
T = T1 T2 ….. Tn
All schemas must contain a common candidate key (or
superkey) to ensure lossless join property.
A special attribute, the tuple-id attribute may be added to
each schema to serve as a candidate key.
14. A employee-info schema has a relation
employee-info schema = (designation, name,
Employee-id, salary).
It fragments the relation to put information in two
tables for security concern.
15. Commit protocols are used to ensure
atomicity across sites
Atomicity states that database modifications must
follow an “all or nothing” rule.
a transaction which executes at multiple sites must
either be committed at all the sites, or aborted at all the
sites.
16. What is this?
Two-phase commit is a transaction protocol designed
for the complications that arise with distributed
resource managers.
Two-phase commit technology is used for hotel and
airline reservations, stock market transactions, banking
applications, and credit card systems.
With a two-phase commit protocol, the distributed
transaction manager employs a coordinator to manage
the individual resource managers. The commit process
proceeds as follows:
17. Step 1 Coordinator asks all participants to
prepare to commit transaction Ti.
Ci adds the records <prepare T> to the log and forces
log to stable storage (a log is a file which maintains a
record of all changes to the database)
sends prepare T messages to all sites where T
executed
18. Step 2 Upon receiving message, transaction
manager at site determines if it can commit the
transaction
if not:
add a record <no T> to the log and send abort T
message to Ci
if the transaction can be committed, then:
1). add the record <ready T> to the log
2). force all records for T to stable storage
3). send ready T message to Ci
19. Step 1 T can be committed of Ci received a ready T
message from all the participating sites: otherwise T
must be aborted.
Step 2 Coordinator adds a decision record,
<commit T> or <abort T>, to the log and forces record
onto stable storage. Once the record is in stable storage,
it cannot be revoked (even if failures occur)
Step 3 Coordinator sends a message to each
participant informing it of the decision (commit or abort)
Step 4 Participants take appropriate action locally.
20.
21. There have been two performance issues with two
phase commit:
◦ If one database server is unavailable, none of the
servers gets the updates.
◦ This is correctable through network tuning and correctly
building the data distribution through database
optimization techniques.