Distributed Databases
Mrs.Bhagyashri Rahul Joshi
Difference between Centralized Database and Distributed Database
�
Advantages –�
Distributed Database :�A distributed database is basically a type of database which consists of multiple databases that are connected with each other and are spread across different physical locations. The data that is stored on various physical locations can thus be managed independently of other physical locations. The communication between databases at different physical locations is thus done by a computer network.
Centralized database | Distributed database |
It is database that is stored, located as well as maintained at a single location only. | It is a database which consists of multiple databases which are connected with each other and are spread across different physical locations. |
The data access time in case of multiple users is more in a centralized database. | The data access time in case of multiple users is less in a distributed database. |
The management, modification and backup of this database is easier as entire data is present at the same location. | The management, modification and backup of this database is very difficult as it is spread across different physical locations. |
This database provides a uniform and complete view to the user. | Since it is spread across different locations thus it is difficult to provide a uniform view to the user. |
This database has more data consistency in comparison to distributed database. | This database may have some data replications thus data consistency is less. |
The users cannot access database in case database failure occurs. | In distributed database if one database fails users have access to other databases. |
Centralized database is less costly. | This database is very expensive. |
Functions Of a DDBMS
or application program.
storage.
Maintain The database.
Homogeneous distributed databases system:
Example: Consider that we have three departments using Oracle-9i for DBMS. If some changes are made in one department then, it would update the other department also.�
Heterogeneous distributed databases system:
Heterogeneous distributed database system is a network of two or more databases with different types of DBMS software, which can be stored on one or more machines.
In this system data can be accessible to several databases in the network with the help of generic connectivity (ODBC and JDBC).
Example: Example: In the following diagram, different DBMS software are accessible to each other using ODBC and JDBC.
Replication
than one site or node. It is useful in improving the availability
of data.
to another server so that all the users can share the same data
without any inconsistency. The result is a distributed database in
which users can access data relevant to their tasks without interfering
with the work of others.
Snapshot Replication –
AAA
BBB
CCC
AAA
BBB
CCC
AAA
BBB
CCC
Publisher
Subscriber
Subscriber
Snapshot Replication
Merge Replication –
AAA
BBB
CCC
AAA
BBB
CCC
AAA
BBB
CCC
AAA
BBB
CCC
AAA
BBB
CCC
AAA
BBB
CCC
AAA
BBB
CCC
Publisher
Publisher
Subscriber
Subscriber
Subscriber
Subscriber
Subscriber
Subscriber
Transactional Replication
AAA
*BBB
CCC
*DDD
*EEE
AAA
BBB*
CCC
DDD*
EEE*
Publisher
Subscriber
Transactional Replication
Advantages of Data Replication�
of any site, the database system continues to work since a copy
is available at another site(s).
Disadvantages of Data Replication�
Data fragmentation
broken up into many pieces that are not close together.
It is typically the result of attempting to insert a large object
into storage that has already suffered external fragmentation.
portion of the database is to be stored where. One technique
used to break up the database into logical units called fragments. Fragmentation information is stored in a distributed
data catalogue which the processing computer uses to process a user's request.
Types Of Fragmentation
Horizontal Fragmentation
CREATE COMP_STD AS
SELECT * FROM STUDENT
WHERE COURSE = "Computer Science";
Vertical Fragmentation
Regd_No | Name | Course | Address | Semester | Fees | Marks |
In vertical fragmentation, the fields or columns of a table are grouped into fragments.
In order to maintain reconstructiveness, each fragment should contain the primary key field(s) of the table.
Vertical fragmentation can be used to enforce privacy of data.
For example, let us consider that a University database keeps records of all registered
students in a Student table having the following schema.
STUDENT
Now, the fees details are maintained in the accounts section.
In this case, the designer will fragment the database as follows −
CREATE TABLE STD_FEES AS
SELECT Regd_No, Fees FROM STUDENT;
Hybrid Fragmentation�
Mixed Fragmentation
Advantages of Fragmentation
What is Client Server Architecture�
1-Tier Architecture�
For example – Presentation, Business, Data Access layer with using of single software package. All data is saved on the local machine. Some applications, which manage all three tiers like as MP3 player, MS Office; but these types of applications are presented under 1-tier architecture applications.
2-Tier Architecture�
In this architecture, client and server machines are connected directly incorporation because if client is firing any input for server terminal then in between should not any intermediate. So, it delivers the output with fastest rate and to ignore misunderstanding between the other clients. For example – online ticket reservations program, in which 2-tier architecture is used.
Benefits Are
Limitations Are
3-Tier Architecture�
3-tier architecture is divided into 3 layers such as presentation layer (Client Tier), Application layer (Business Tier) and Database layer (Data Tier). Client machine handles the presentation layer, Application layer controls the Application layer, and finally Server machine takes care of Database layer.
Benefits Are
Limitation is:
To increase complexity of communication in between client and server because in which middleware is also used
Examples of Client Server Architecture�
Components of Client Server Architecture�