0% found this document useful (0 votes)
54 views13 pages

DBMS - Lesson 5 - The DBMS Environment

Uploaded by

keithrashid8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views13 pages

DBMS - Lesson 5 - The DBMS Environment

Uploaded by

keithrashid8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

DBMS Lesson 5 – The Database Management Systems Environment

The database system environment


The database system environment is a collective system of components that are meant for
defining storing and managing collected data. So as to understand the components of a database
management system there is need to first understand the following database concepts.
.Database Management System architecture
A database architecture is a representation of DBMS design. It includes setting the standards
for the security and programming aspects of these databases, as well as figuring out how these
databases will operate and function within existing structures.
It helps to design, develop, implement, and maintain the database management system and
focuses on database design and construction for large database systems that manage massive
amounts of information for organizations
The DBMS architecture is the foundation of any database management system, which lets the
DBMS perform it functions efficiently and effectively. The whole concept of DBMS revolves
around its architecture. Depending upon the architecture, database management systems are
designed as centralized, decentralized, and hierarchical.
Note:
 A DBMS architecture:
 Allows dividing the database system into individual components that can be
independently modified, changed, replaced, and altered.
 It also helps to understand the components of a database.
 A database store a lot of critical information and the design of a DBMS depends on its
architecture hence it is important to select a correct architecture for efficient data
management.
Types of database architecture
There are mainly three types of DBMS architecture namely
Single/One tier architecture.
Tier means “level/layer”. One tier architecture also known as a single tier architecture, this is
a type of database architecture in which the user directly sits on the DBMS and uses it, i.e. the
data is directly provided to the user and the user can directly use the database through the
computer.

1 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems 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

2 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

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

The levels that are used in 3-Tier DBMS architecture are:


 Database Server (Tier-1): This tier contains and deals with all the data and information.
Also, it guarantees that all the data is stored in a secured manner and there might not
occur a situation of data inconsistency or data redundancy.
 Application Layer (Tier-2): The application layer acts as an intermediate between the
User/Client and the actual database. But it ensures to present the abstracted view of the

3 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

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

Advantages of the three tier architecture


 Security: Keeping the database connection open to a single back end reduces the risks of
being hacked.
 Scalability: Because each layer operates independently, it is easier to scale parts of the
application.
 Faster deployment: Having multiple tiers makes it easier to have a separation of
concerns and to follow cloud-native best practices, including better continuous delivery
processes.
 Ease of modification: It is easy to modify or replace one tier without affecting the other
tiers.

4 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

 Independence: It is possible to use different sets of developers since each tier is


independent. Managing data is independent from the physical storage.
Disadvantages
 It is a more complex structure
 It is more difficult to set up and maintain it as well.
 It is more difficult to build a three tier application.
 The physical separation of the tiers may affect the performance between the three tiers.
The three schema architecture
The three schema architecture is also known as ANSI/SPARC architecture or three-level
architecture is a frame work used to describe the structure of a specific database system.
Levels of the three schema architecture
The three schema architecture has three levels namely
 External level
 Conceptual level
 Internal level
This levels are illustrated in the following diagram (DBMS Three Level Architecture Diagram)

5 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

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.

6 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

 Internal structure of the database should be unaffected by changes to physical aspects of


the storage
Data Abstraction in DBMS
Database systems are made-up of complex data structures. To ease the user interaction with
database, the developers hide internal irrelevant details from users. This process of hiding
irrelevant details from user is called data abstraction. The term “irrelevant” used here with
respect to the user, it doesn’t mean that the hidden data is not relevant with regard to the whole
database. It just means that the user is not concerned about that data.
For example: When one is booking a train ticket, one is not concerned with how data is being
processed at the back end when one clicks “book ticket”, what processes are happening when
one is doing online payments.
One is just concerned about the message that pops up when the ticket is successfully booked.
This does not mean that the processes happening at the back end are not relevant, it just means
that one as a user is not concerned with what is happening in the database.
Three levels of abstraction
There three main levels of DBMS abstraction as shown in the following diagram

 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.

7 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

 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

8 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

 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).

9 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

 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

10 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

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

11 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

Logical data independence


Logical data independence is the ability to modify the conceptual schema without causing
application program to be rewritten. Logical data is data about database, that is, it stores
information about how data is managed inside. For example, a table (relation) stored in the
database and all its constraints, applied on that relation.
Logical data independence is a kind of mechanism, which liberalizes itself from actual data
stored on the disk. If some changes are done on the table format, it should not change the data
residing on the disk.
Physical Data Independence
Application programs are said to exhibit physical data independence if they do not depend on the
physical schema and thus need not be rewritten if a physical schema changes. All the schemas
are logical, and the actual data is stored in bit format on the disk.
Physical data independence is the power to change the physical data without impacting the
schema or logical data. For example, in case one wants to change or upgrade the storage system
itself or suppose one wants to replace hard-disks with SSD any of this action should not have any
impact on the logical data or schemas.

12 Complied by Mr. P.K Munene


DBMS Lesson 5 – The Database Management Systems Environment

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.

 Fundamentals of Database Systems by Ramez Elmasri.

 Database System Concepts by Silberschatz, Sudarshan and Korth.

 Database Management Systems by Raghu Ramakrishnan and Johannes Gehrke

13 Complied by Mr. P.K Munene

You might also like