0% found this document useful (0 votes)
0 views

DBMS Architecture

The document discusses the architecture of Database Management Systems (DBMS), detailing client/server models and types including 1-tier, 2-tier, and 3-tier architectures. It also covers data independence, data models, and the ACID properties essential for maintaining data integrity during transactions. Key data models include the relational, entity-relationship, object-based, and semi-structured models, while ACID properties ensure atomicity, consistency, isolation, and durability in database transactions.

Uploaded by

AMAN RAJ
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

DBMS Architecture

The document discusses the architecture of Database Management Systems (DBMS), detailing client/server models and types including 1-tier, 2-tier, and 3-tier architectures. It also covers data independence, data models, and the ACID properties essential for maintaining data integrity during transactions. Key data models include the relational, entity-relationship, object-based, and semi-structured models, while ACID properties ensure atomicity, consistency, isolation, and durability in database transactions.

Uploaded by

AMAN RAJ
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

DBMS Architecture

o The DBMS design depends upon its architecture. The basic


client/server architecture is used to deal with many PCs, web servers,
database servers and other components that are connected to
networks.
o The client/server architecture consists of many PCs and a workstation
which are connected via the network.
o DBMS architecture depends upon how users are connected to the
database to get their requests done.

Types of DBMS Architecture

Database architecture can be seen as a single tier or multi-tier. But logically,


database architecture is of two types like: 2-tier architecture and 3-tier
architecture.
1-Tier Architecture

o In this architecture, the database is directly available to the user. It


means the user can directly sit on the DBMS and uses it.
o Any changes done here will directly be done on the database itself. It
doesn't provide a handy tool for end users.
o The 1-Tier architecture is used for development of the local application,
where programmers can directly communicate with the database for
the quick response.

AD

2-Tier Architecture

o The 2-Tier architecture is same as basic client-server. In the two-tier


architecture, applications on the client end can directly communicate
with the database at the server side. For this interaction, API's
like: ODBC, JDBC are used.
o The user interfaces and application programs are run on the client-
side.
o The server side is responsible to provide the functionalities like: query
processing and transaction management.
o To communicate with the DBMS, client-side application establishes a
connection with the server side.

Fig: 2-tier Architecture

3-Tier Architecture

o The 3-Tier architecture contains another layer between the client and
server. In this architecture, client can't directly communicate with the
server.
o The application on the client-end interacts with an application server
which further communicates with the database system.
o End user has no idea about the existence of the database beyond the
application server. The database also has no idea about any other user
beyond the application.
o The 3-Tier architecture is used in case of large web application.

Data Independence
o Data independence can be explained using the three-schema
architecture.
o Data independence refers characteristic of being able to modify the
schema at one level of the database system without altering the
schema at the next higher level.

There are two types of data independence:

1. Logical Data Independence


o Logical data independence refers characteristic of being able to
change the conceptual schema without having to change the external
schema.
o Logical data independence is used to separate the external level from
the conceptual view.
o If we do any changes in the conceptual view of the data, then the user
view of the data would not be affected.
o Logical data independence occurs at the user interface level.

AD

2. Physical Data Independence


o Physical data independence can be defined as the capacity to change
the internal schema without having to change the conceptual schema.
o If we do any changes in the storage size of the database system
server, then the Conceptual structure of the database will not be
affected.
o Physical data independence is used to separate conceptual levels from
the internal levels.
o Physical data independence occurs at the logical interface level.
Data Models
Data Model is the modeling of the data description, data semantics, and
consistency constraints of the data. It provides the conceptual tools for
describing the design of a database at each level of data abstraction.
Therefore, there are following four data models used for understanding the
structure of the database:

1) Relational Data Model: This type of model designs the data in the form
of rows and columns within a table. Thus, a relational model uses tables for
representing data and in-between relationships. Tables are also called
relations. This model was initially described by Edgar F. Codd, in 1969. The
relational data model is the widely used model which is primarily used by
commercial data processing applications.

2) Entity-Relationship Data Model: An ER model is the logical


representation of data as objects and relationships among them. These
objects are known as entities, and relationship is an association among these
entities. This model was designed by Peter Chen and published in 1976
papers. It was widely used in database designing. A set of attributes describe
the entities. For example, student_name, student_id describes the 'student'
entity. A set of the same type of entities is known as an 'Entity set', and the
set of the same type of relationships is known as 'relationship set'.

3) Object-based Data Model: An extension of the ER model with notions


of functions, encapsulation, and object identity, as well. This model supports
a rich type system that includes structured and collection types. Thus, in
1980s, various database systems following the object-oriented approach
were developed. Here, the objects are nothing but the data carrying its
properties.

4) Semistructured Data Model: This type of data model is different from


the other three data models (explained above). The semi-structured data
model allows the data specifications at places where individual data items of
the same type may have different attribute sets. The Extensible Markup
Language, also known as XML, is widely used for representing semi
structured data. Although XML was initially designed for including the
markup information to the text document, it gains importance because of its
application in the exchange of data.

ACID Properties in DBMS


DBMS is the management of data that should remain integrated when any
changes are done in it. It is because if the integrity of the data is affected,
whole data will get disturbed and corrupted. Therefore, to maintain the
integrity of the data, there are four properties described in the database
management system, which are known as the ACID properties. The ACID
properties are meant for the transaction that goes through a different group
of tasks, and there we come to see the role of the ACID properties.

In this section, we will learn and understand about the ACID properties. We
will learn what these properties stand for and what does each property is
used for. We will also understand the ACID properties with the help of some
examples.
ACID Properties
The expansion of the term ACID defines for:

1) Atomicity
The term atomicity defines that the data remains atomic. It means if any
operation is performed on the data, either it should be performed or
executed completely or should not be executed at all. It further means that
the operation should not break in between or execute partially. In the case of
executing operations on the transaction, the operation should be completely
executed and not partially.

Example: If Remo has account A having $30 in his account from which he
wishes to send $10 to Sheero's account, which is B. In account B, a sum of $
100 is already present. When $10 will be transferred to account B, the sum
will become $110. Now, there will be two operations that will take place. One
is the amount of $10 that Remo wants to transfer will be debited from his
account A, and the same amount will get credited to account B, i.e., into
Sheero's account. Now, what happens - the first operation of debit executes
successfully, but the credit operation, however, fails. Thus, in Remo's
account A, the value becomes $20, and to that of Sheero's account, it
remains $100 as it was previously present.
In the above diagram, it can be seen that after crediting $10, the amount is
still $100 in account B. So, it is not an atomic transaction.

The below image shows that both debit and credit operations are done
successfully. Thus the transaction is atomic.
Thus, when the amount loses atomicity, then in the bank systems, this
becomes a huge issue, and so the atomicity is the main focus in the bank
systems.

2) Consistency
The word consistency means that the value should remain preserved
always. In DBMS, the integrity of the data should be maintained, which
means if a change in the database is made, it should remain preserved
always. In the case of transactions, the integrity of the data is very essential
so that the database remains consistent before and after the transaction.
The data should always be correct.

Example:

In the above figure, there are three accounts, A, B, and C, where A is making
a transaction T one by one to both B & C. There are two operations that take
place, i.e., Debit and Credit. Account A firstly debits $50 to account B, and
the amount in account A is read $300 by B before the transaction. After the
successful transaction T, the available amount in B becomes $150. Now, A
debits $20 to account C, and that time, the value read by C is $250 (that is
correct as a debit of $50 has been successfully done to B). The debit and
credit operation from account A to C has been done successfully. We can see
that the transaction is done successfully, and the value is also read correctly.
Thus, the data is consistent. In case the value read by B and C is $300, which
means that data is inconsistent because when the debit operation executes,
it will not be consistent.

AD

3) Isolation
The term 'isolation' means separation. In DBMS, Isolation is the property of a
database where no data should affect the other one and may occur
concurrently. In short, the operation on one database should begin when the
operation on the first database gets complete. It means if two operations are
being performed on two different databases, they may not affect the value of
one another. In the case of transactions, when two or more transactions
occur simultaneously, the consistency should remain maintained. Any
changes that occur in any particular transaction will not be seen by other
transactions until the change is not committed in the memory.

Example: If two operations are concurrently running on two different


accounts, then the value of both accounts should not get affected. The value
should remain persistent. As you can see in the below diagram, account A is
making T1 and T2 transactions to account B and C, but both are executing
independently without affecting each other. It is known as Isolation.
4) Durability
Durability ensures the permanency of something. In DBMS, the term
durability ensures that the data after the successful execution of the
operation becomes permanent in the database. The durability of the data
should be so perfect that even if the system fails or leads to a crash, the
database still survives. However, if gets lost, it becomes the responsibility of
the recovery manager for ensuring the durability of the database. For
committing the values, the COMMIT command must be used every time we
make changes.

You might also like