DBMS - Lesson 5 - The DBMS Environment
DBMS - Lesson 5 - The DBMS Environment
Any changes done here will directly be done on the DBMS itself. It does not provide handy tools
for end-users. The one tier architecture is used for enhancement of the local application where
the programmer can directly communicate with the database of the application for rapid
response.
Note:
Database designers and programmers normally prefer to use single-tier architecture.
In the one tier architecture database in which the client, server, and database all reside on
the same machine.
Cloud-based drives and Personal computer systems can be possible examples of 1-Tier
architecture. A simple one tier architecture example would be anytime you install a
Database in your system and access it to practice SQL queries.
Two tier architecture
A two tier architecture in DBMS also known as the client-server architecture is a database
architecture which consists of two tiers. Tier-1 being the database server and Tier-2 being the
users or clients of the application as shown in the following diagram
In this type of DBMS architecture, the users of the software application deal with the database
software and can receive responses to the requests made by them. The user cannot manipulate
the data inside the database without permission. Client-Server architecture can be a possible
example of 2-Tier DBMS architecture.
Three tier architecture
A 3 tier architecture in DBMS is the most popular client server architecture and it is an
extension of the 2-tier client-server architecture with an additional layer between the client and
server as show in the following diagram
database and provides a way to respond to the queries requested by the user by fetching
the response from the database in tier-1.
User/Client Layer (Tier-3): This is the topmost layer from where users/clients can
request data and in response, the data is fetched from the database tier and passed on to
the user/client tier via the application layer in the most meaningful way possible. It also
provides the graphical user interface (GUI) to the users.
Note:
The 3-Tier architecture of DBMS is a fully-fledged software system that is responsible
for generating responses to user queries in the most efficient and suitable manner.
The 3-Tier architecture is the most complex among all three but solves almost all the
issues that occur in 2-Tier and 1-Tier architecture.
Security, Data Backup, Recovery, Concurrency Control, and Low Data Redundancy are
some of the features of a 3-Tier architecture, which makes it the most widely used
database architecture.
Goals/objectives of the three tier architecture
The goals or objectives of the three tier architecture are
To separate the user applications and physical database
To support DBMS characteristics
Program-data independence
Supporting multiple views of the data
External level
The external level also known as the view level or the top level is the highest level in the three
level architecture and closest to the user. This level only shows the relevant database content to
the users in the form of views and hides the rest of the data, data structure, and table definition.
Hence, different users view the database differently as per their individual requirements.
Conceptual level
The conceptual level also known as the logical level describes how the database appears to the
users conceptually and the relationships between various data tables, i.e. the whole design of the
database such as relationship among data, schema of data etc. are described in this level. The
conceptual level does not care for how the data in the database is actually stored. Database
constraints and security are also implemented in this level of architecture. This level is maintained
by DBA (database administrator).
Internal level
The physical level also known as the internal level is the lowest level in the three level
architecture. It describes how data is actually stored in the database and is the lowest level of the
architecture. The physical level is also responsible for allocating space to the data, where data is
stored in files and folders.
Objective of the three schema architecture
The main objective of three level architecture is to enable multiple users to access the same data
with a personalized view while storing the underlying data only once. Thus it separates the user's
view from the physical structure of the database. This separation is desirable for the following
reasons:
Different users need different views of the same data.
The approach in which a particular user needs to see the data may change over time.
The users of the database should not worry about the physical implementation and
internal workings of the database such as data compression and encryption techniques,
hashing, optimization of the internal structures etc.
All users should be able to access the same data according to their requirements.
DBA should be able to change the conceptual structure of the database without affecting
the users.
Physical level: This is the lowest level of data abstraction. It describes how data is
actually stored in database. One can get the complex data structure details at this level.
Logical level: This is the middle level of 3-level data abstraction architecture. It describes
what data is stored in database.
View level: Highest level of data abstraction. This level describes the user interaction
with database system.
Example: If customer information is stored in a customer table.
At physical level these records can be described as blocks of storage (bytes, gigabytes,
terabytes etc.) in memory. These details are often hidden from the programmers.
At the logical level these records can be described as fields and attributes along with their
data types, their relationship among each other can be logically implemented. The
programmers generally work at this level because they are aware of such things about
database systems.
At view level, user just interact with system with the help of GUI and enter the details at
the screen, they are not aware of how the data is stored and what data is stored; such
details are hidden from them.
Schema in DBMS.
A database schema is the skeleton structure that represents the logical view of the entire
database. It is the overall design of a database, e.g. an employee table in database exists with the
following attributes:
This is the schema of the employee table. Schema defines the attributes of tables in the database.
The database schema 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. It defines a database
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.
Categories a database schema
A database schema can be divided broadly into two categories namely
Logical schema
Physical schema
As shown in the diagram below
Physical database schema: This schema pertains to the actual storage of data and its form
of storage like files, indices, etc. It defines how the data will be stored in a secondary
storage.
Logical database schema: This schema defines all the logical constraints that need to be
applied on the data stored. It defines tables, views, and integrity constraints.
Schema objectives
Schema represents the logical view of the database. It helps you understand what data
needs to go where.
Schema helps the database users to understand the relationship between data. This helps
in efficiently performing operations on database such as insert, update, delete, search etc.
Note:
The design of a database at physical level is called physical schema, how the data stored
in blocks of storage is described at this level.
Design of database at logical level is called logical schema, programmers and database
administrators work at this level, at this level data can be described as certain types of
data records gets stored in data structures, however the internal details such as
implementation of data structure is hidden at this level (available at physical level).
Design of database at view level is called view schema. This generally describes end user
interaction with database systems.
The following diagram, shows a schema of the relationship between three tables: Course,
Student and Section. The diagram only shows the design of the database, it does not show the
data present in those tables. Note: Schema is only a structural view (design) of a database as
Note:
Database schema is the skeleton of database. It is designed when the database does not
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.
Subschemas
Database may also have several schema at the view level, which describe different view of the
database. These schemas are known as sub schemas.
DBMS Instance.
The data stored in database at a particular moment of time is known as instance of database.
The database schema defines the attributes in tables that belong to a particular database. The
value of these attributes at a moment of time is known as the instance, state and snapshot of
that database.
Example one
Above is the schema of table “employee” Now let us see the table with the data. At this moment
the table contains two rows (records). This is the current instance of the table “employee”
because this is the data that is stored in this table at this particular moment of time
Example two
There is a single table student in the database, currently the table is 100 records, so currently the
instance of the database is 100 records. We are going to add another 100 records in this table by
tomorrow so the instance of database tomorrow will have 200 records in table. In short, at a
particular moment the data stored in database is called the instance, this changes over time as and
when we add, delete or update data in the database.
Note:
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.
Database data independence
Data independence is the ability to modify a schema definition at level 1 without affecting
schema definition in a higher level.
Forms or types Database data independence
There two forms or types of database data independence as shown in the following diagram
Note:
A database system normally contains a lot of data in addition to users’ data. For example, it stores
data about data, known as metadata, to locate and retrieve data easily. It is rather difficult to
modify or update a set of metadata once it is stored in the database. But as a DBMS expands, it
needs to change over time to satisfy the requirements of the users. If the entire data is dependent,
it would become a tedious and highly complex job hence the need for data independence.
References
Dr. S.B Gupta, A. Mittal (2009) Introduction to database management systems. Laxmi
publications PVT limited.
C.Rajiv (2016) Database Management System (DBMS). A practical Approach 5th
Edition. S.Chand Publishing.
R.P Mahapata, Govind Verma (2013) Database Management System. Khama Publishing
House.
T.Connolly, C.Begg (2005) Database Management System. A practical approach to
design, implementation and management. Pearson Education Limited
https://www.studytonight.com/dbms/database-model.php
http://www.myreadingroom.co.in/notes-and-studymaterial/65-dbms/464-components-of-
database-systems.html
https://www.javatpoint.com/dbms-architecture
https://beginnersbook.com/2018/11/dbms-architecture/
https://www.relationaldbdesign.com/database-design/module2/intro-relational-database-
structure.php.