Module 1 Notes
Module 1 Notes
DBMS Architecture
o The DBMS design depends upon its architecture. The basic client/server architecture is used to
deal with a large number of PCs, web servers, database servers and other components that are
connected with 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 request
done.
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.
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.
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 Abstraction
It is a process of hiding unwanted or irrelevant details from the end user. It provides a different
view and helps in achieving data independence which is used to enhance the security of data.
The database systems consist of complicated data structures and relations. For users to access
the data easily, these complications are kept hidden, and only the relevant part of the database is
made accessible to the users through data abstraction.
Levels of abstraction for DBMS
Database systems include complex data-structures. In terms of retrieval of data, reduce
complexity in terms of usability of users and in order to make the system efficient, developers
use levels of abstraction that hide irrelevant details from the users. Levels of abstraction simplify
database design.
Mainly there are three levels of abstraction for DBMS, which are as follows −
Data Independence
Data independence is the ability to modify the scheme without affecting the programs and the
application to be rewritten. Data is separated from the programs, so that the changes made to the
data will not affect the program execution and the application.
We know the main purpose of the three levels of data abstraction is to achieve data
independence. If the database changes and expands over time, it is very important that the
changes in one level should not affect the data at other levels of the database. This would save
time and cost required when changing the database.
There are two levels of data independence based on three levels of abstraction. These are as
follows −
Physical Data Independence
Logical Data Independence
The RDBMS is the most popular database system among organizations across the world. It
provides a dependable method of storing and retrieving large amounts of data while offering a
combination of system performance and ease of implementation.
In general, databases store sets of data that can be queried for use in other applications. A
database management system supports the development, administration and use of database
platforms.
An RDBMS is a type of database management system (DBMS) that stores data in a row-based
table structure which connects related data elements. An RDBMS includes functions that
maintain the security, accuracy, integrity and consistency of the data. This is different than the
file storage used in a DBMS.
Other differences between database management systems and relational database management
systems include:
Number of allowed users. While a DBMS can only accept one user at a time, an
RDBMS can operate with multiple users.
Hardware and software requirements. A DBMS needs less software and hardware
than an RDBMS.
Amount of data. RDBMSes can handle any amount of data, from small to large, while a
DBMS can only manage small amounts.
ACID implementation. DBMSes do not use the atomicity, consistency, isolation and
durability (ACID) model for storing data. On the other hand, RDBMSes base the structure of
their data on the ACID model to ensure consistency.
Database Schema
A database schema is the skeleton structure that represents the logical view of the entire
database. It defines how the data is organized and how the relations among them are associated.
It formulates all the constraints that are to be applied on the data.
A database schema defines its entities and the relationship among them. It contains a descriptive
detail of the database, which can be depicted by means of schema diagrams. It’s the database
designers who design the schema to help programmers understand the database and make it
useful.
Database Instance
It is important that we distinguish these two terms individually. Database schema is the skeleton
of database. It is designed when the database doesn't exist at all. Once the database is
operational, it is very difficult to make any changes to it. A database schema does not contain
any data or information.
A database instance is a state of operational database with data at any given time. It contains a
snapshot of the database. Database instances tend to change with time. A DBMS ensures that its
every instance (state) is in a valid state, by diligently following all the validations, constraints,
and conditions that the database designers have imposed.
Data models
Data models define how the logical structure of a database is modeled. Data Models are
fundamental entities to introduce abstraction in a DBMS. Data models define how data is
connected to each other and how they are processed and stored inside the system.
The very first data model could be flat data-models, where all the data used are to be kept in the
same plane. Earlier data models were not so scientific, hence they were prone to introduce lots of
duplication and update anomalies.
Entity-Relationship Model
Entity-Relationship (ER) Model is based on the notion of real-world entities and relationships
among them. While formulating real-world scenario into the database model, the ER Model
creates entity set, relationship set, general attributes and constraints.
ER Model is best used for the conceptual design of a database.
ER Model is based on −
Entities and their attributes.
Relationships among entities.
These concepts are explained below.
Relational Model
The most popular data model in DBMS is the Relational Model. It is more scientific a model
than others. This model is based on first-order predicate logic and defines a table as an n-ary
relation.