Unit1 DBMS
Unit1 DBMS
DBMS
DBMS Tutorial provides basic and advanced concepts of Database. Our DBMS Tutorial is
designed for beginners and professionals both.
Our DBMS Tutorial includes all topics of DBMS such as introduction, ER model, keys,
relational model, join operation, SQL, functional dependency, transaction, concurrency
control, etc.
What is Database
The database is a collection of inter-related data which is used to retrieve, insert and delete
the data efficiently. It is also used to organize the data in the form of a table, schema, views,
and reports, etc.
For example: The college Database organizes the data about the admin, staff, students and
faculty etc.
Using the database, you can easily retrieve, insert, and delete the information.
o Database management system is a software which is used to manage the database. For
example: MySQL, Oracle, etc are a very popular commercial database which is used
in different applications.
o DBMS provides an interface to perform various operations like database creation,
storing data in it, updating data, creating a table in the database and a lot more.
o It provides protection and security to the database. In the case of multiple users, it also
maintains data consistency.
DBMS allows users the following tasks:
o Data Definition: It is used for creation, modification, and removal of definition that
defines the organization of data in the database.
o Data Updation: It is used for the insertion, modification, and deletion of the actual
data in the database.
o Data Retrieval: It is used to retrieve the data from the database which can be used by
applications for various purposes.
o User Administration: It is used for registering and monitoring users, maintain data
integrity, enforcing data security, dealing with concurrency control, monitoring
performance and recovering information corrupted by unexpected failure.
Characteristics of DBMS
o It uses a digital repository established on a server to store and manage the
information.
o It can provide a clear and logical view of the process that manipulates data.
o DBMS contains automatic backup and recovery procedures.
o It contains ACID properties which maintain data in a healthy state in case of failure.
o It can reduce the complex relationship between data.
o It is used to support manipulation and processing of data.
o It is used to provide security of data.
o It can view the database from different viewpoints according to the requirements of
the user.
Advantages of DBMS
o Controls database redundancy: It can control data redundancy because it stores all
the data in one single database file and that recorded data is placed in the database.
o Data sharing: In DBMS, the authorized users of an organization can share the data
among multiple users.
o Easily Maintenance: It can be easily maintainable due to the centralized nature of the
database system.
o Reduce time: It reduces development time and maintenance need.
o Backup: It provides backup and recovery subsystems which create automatic backup
of data from hardware and software failures and restores the data if required.
o multiple user interface: It provides different types of user interfaces like graphical
user interfaces, application program interfaces
Disadvantages of DBMS
o Cost of Hardware and Software: It requires a high speed of data processor and large
memory size to run DBMS software.
o Size: It occupies a large space of disks and large memory to run them efficiently.
o Complexity: Database system creates additional complexity and requirements.
o Higher impact of failure: Failure is highly impacted the database because in most of
the organization, all the data stored in a single database and if the database is damaged
due to electric failure or database corruption then the data may be lost forever.
Objectives of DBMS
DBMS has many objectives to increase the efficiency and organized handling of
data in an organization. The main objectives of DBMS are –
Data Availability:
DBMS ensures that the format of data should be meaningful and at a reasonable
cost so that a wide range of users can access it.
Data Independence:
DBMS allows easier modification of databases without affecting the applications.
Physical Level: At the physical level, the information about the location of
database objects in the data store is kept. Various users of DBMS are unaware
of the locations of these objects.In simple terms,physical level of a database
describes how the data is being stored in secondary storage devices like disks
and tapes and also gives insights on additional storage details.
Conceptual Level: At conceptual level, data is represented in the form of
various database tables. For Example, STUDENT database may contain
STUDENT and COURSE tables which will be visible to users but users are
unaware of their storage.Also referred as logical schema,it describes what kind
of data is to be stored in the database.
External Level: An external level specifies a view of the data in terms of
conceptual level tables. Each external level view is used to cater to the needs of
a particular category of users. For Example, FACULTY of a university is
interested in looking course details of students, STUDENTS are interested in
looking at all details related to academics, accounts, courses and hostel details
as well. So, different views can be generated for different users. The main focus
of external level is data abstraction.
Data Independence
Data independence means a change of data at one level should not affect another
level. Two types of data independence are present in this architecture:
Aiming for a top All India Rank in GATE CS/IT or GATE DA 2026? Our courses,
led by experts like Khaleel Sir, Chandan Jha Sir, and Vijay Agarwal Sir,
offer live classes, practice problems, doubt support, quizzes, and All India Mock
Tests—all in one place.
Physical Data Independence: Any change in the physical location of tables
and indexes should not affect the conceptual level or external view of data. This
data independence is easy to achieve and implemented by most of the DBMS.
Conceptual Data Independence: The data at conceptual level schema and
external level schema must be independent. This means a change in conceptual
schema should not affect external schema. e.g.; Adding or deleting attributes of
a table should not affect the user’s view of the table. But this type of
independence is difficult to achieve as compared to physical data independence
because the changes in conceptual schema are reflected in the user’s view.
Phases of Database Design
Database designing for a real-world application starts from capturing the
requirements to physical implementation using DBMS software which consists of
following steps shown below:
DBMS Phases
DBMS also give permission to the user to use the data according to their needs. The word
"DBMS" contains information regarding the database program and the users. It also provides an
interface between the user and the software. In this topic, we are going to discuss the various
types of DBMS.
Components of DBMS
There are many components available in the DBMS. Each component has a significant task in the
DBMS. A database environment is a collection of components that regulates the use of data,
management, and a group of data. These components consist of people, the technique of Handel
the database, data, hardware, software, etc. there are several components available for the DBMS.
We are going to explain five main topics of the database below.
1. Hardware
o Here the hardware means the physical part of the DBMS. Here the hardware includes output
devices like a printer, monitor, etc., and storage devices like a hard disk.
o In DBMS, information hardware is the most important visible part. The equipment which is
used for the visibility of the data is the printer, computer, scanner, etc. This equipment is used
to capture the data and present the output to the user.
o With the help of hardware, the DBMS can access and update the database.
o The server can store a large amount of data, which can be shared with the help of the user's
own system.
o The database can be run in any system that ranges from microcomputers to mainframe
computers. And this database also provides an interface between the real worlds to the
database.
o When we try to run any database software like MySQL, we can type any commands with the
help of our keyboards, and RAM, ROM, and processor are part of our computer system.
2. Software
o Software is the main component of the DBMS.
o Software is defined as the collection of programs that are used to instruct the computer about
its work. The software consists of a set of procedures, programs, and routines associated with
the computer system's operation and performance. Also, we can say that computer software is
a set of instructions that is used to instruct the computer hardware for the operation of the
computers.
o The software includes so many software like network software and operating software. The
database software is used to access the database, and the database application performs the
task.
o This software has the ability to understand the database accessing language and then convert
these languages to real database commands and then execute the database.
o This is the main component as the total database operation works on a software or
application. We can also be called as database software the wrapper of the whole physical
database, which provides an easy interface for the user to store, update and delete the data
from the database.
o Some examples of DBMS software include MySQL, Oracle, SQL Server, dBase, FileMaker,
Clipper, Foxpro, Microsoft Access, etc.
3. Data
o The term data means the collection of any raw fact stored in the database. Here the
data are any type of raw material from which meaningful information is generated.
o The database can store any form of data, such as structural data, non-structural data,
and logical data.
o The structured data are highly specific in the database and have a structured format.
But in the case of non-structural data, it is a collection of different types of data, and
these data are stored in their native format.
o We also call the database the structure of the DBMS. With the help of the database,
we can create and construct the DBMS. After the creation of the database, we can
create, access, and update that database.
o The main reason behind discovering the database is to create and manage the data
within the database.
o Data is the most important part of the DBMS. Here the database contains the actual
data and metadata. Here metadata means data about data.
o For example, when the user stores the data in a database, some data, such as the size
of the data, the name of the data, and some data related to the user, are stored within
the database. These data are called metadata.
4. Procedures
o The procedure is a type of general instruction or guidelines for the use of DBMS. This
instruction includes how to set up the database, how to install the database, how to log
in and log out of the database, how to manage the database, how to take a backup of
the database, and how to generate the report of the database.
o In DBMS, with the help of procedure, we can validate the data, control the access and
reduce the traffic between the server and the clients. The DBMS can offer better
performance to extensive or complex business logic when the user follows all the
procedures correctly.
o The main purpose of the procedure is to guide the user during the management and
operation of the database.
o The procedure of the databases is so similar to the function of the database. The major
difference between the database procedure and database function is that the database
function acts the same as the SQL statement. In contrast, the database procedure is
invoked using the CALL statement of the DBMS.
o Database procedures can be created in two ways in enterprise architecture. These two
ways are as below.
o The individual object or the default object.
o The operations in a container.
1. CREATE [OR REPLACE] PROCEDURE procedure_name (<Argument> {IN, OUT, IN OUT}
2. <Datatype>,...)
3. IS
4. Declaration section<variable, constant> ;
5. BEGIN
6. Execution section
7. EXCEPTION
8. Exception section
9. END
The following commands serve as the base for all DDL commands:
o ALTER<object>
o COMMENT
o CREATE<object>
o DESCRIBE<object>
o DROP<object>
o SHOW<object>
o USE<object>
2. Data Manipulation Language(DML): It is used to access a database. The DML provides
the statements to retrieve, modify, insert and delete the data from the database.
The following commands serve as the base for all DML commands:
o INSERT
o UPDATE
o DELETE
o LOCK
o CALL
o EXPLAIN PLAN
6. People
o The people who control and manage the databases and perform different types of
operations on the database in the DBMS.
o The people include database administrator, software developer, and End-user.
o Database administrator-database administrator is the one who manages the complete
database management system. DBA takes care of the security of the DBMS, its
availability, managing the license keys, managing user accounts and access, etc.
o Software developer- theThis user group is involved in developing and designing the
parts of DBMS. They can handle massive quantities of data, modify and edit
databases, design and develop new databases, and troubleshoot database issues.
o End user - These days, all modern web or mobile applications store user data. How do
you think they do it? Yes, applications are programmed in such a way that they collect
user data and store the data on a DBMS system running on their server. End users are
the ones who store, retrieve, update and delete data.
o The users of the database can be classified into different groups.
o Native Users
o Online Users
o Sophisticated Users
o Specialized Users
o Application Users
o DBA - Database Administrator
Data Models
Aiming for a top All India Rank in GATE CS/IT or GATE DA 2026? Our courses,
led by experts like Khaleel Sir, Chandan Jha Sir, and Vijay Agarwal Sir,
offer live classes, practice problems, doubt support, quizzes, and All India Mock
Tests—all in one place.
1. Conceptual Data Model
The conceptual data model describes the database at a very high level and is useful
to understand the needs or requirements of the database. It is this model, that is
used in the requirement-gathering process i.e. before the Database Designers start
making a particular database. One such popular model is the entity/relationship
model (ER model). The E/R model specializes in entities, relationships, and even
attributes that are used by database designers. In terms of this concept, a discussion
can be made even with non-computer science(non-technical) users and
stakeholders, and their requirements can be understood.
Entity-Relationship Model( ER Model): It is a high-level data model which is
used to define the data and the relationships between them. It is basically a
conceptual design of any database which is easy to design the view of data.
Components of ER Model:
1. Entity: An entity is referred to as a real-world object. It can be a name, place,
object, class, etc. These are represented by a rectangle in an ER Diagram.
2. Attributes: An attribute can be defined as the description of the entity. These
are represented by Ellipse in an ER Diagram. It can be Age, Roll Number, or
Marks for a Student.
3. Relationship: Relationships are used to define relations among different
entities. Diamonds and Rhombus are used to show Relationships.
Characteristics of a conceptual data model
Offers Organization-wide coverage of the business concepts.
This type of Data Models are designed and developed for a business audience.
The conceptual model is developed independently of hardware specifications
like data storage capacity, location or software specifications like DBMS
vendor and technology. The focus is to represent data as a user will see it in the
“real world.”
Conceptual data models known as Domain models create a common vocabulary
for all stakeholders by establishing basic concepts and scope
2. Representational Data Model
This type of data model is used to represent only the logical part of the database
and does not represent the physical structure of the database. The representational
data model allows us to focus primarily, on the design part of the database. A
popular representational model is a Relational model. The relational Model
consists of Relational Algebra and Relational Calculus. In the Relational Model,
we basically use tables to represent our data and the relationships between them. It
is a theoretical concept whose practical implementation is done in Physical Data
Model.
The advantage of using a Representational data model is to provide a foundation to
form the base for the Physical model.
Characteristics of Representational Data Model
Represents the logical structure of the database.
Relational models like Relational Algebra and Relational Calculus are
commonly used.
Uses tables to represent data and relationships.
Provides a foundation for building the physical data model.
3. Physical Data Model
The physical Data Model is used to practically implement Relational Data Model.
Ultimately, all data in a database is stored physically on a secondary storage device
such as discs and tapes. This is stored in the form of files, records, and certain
other data structures. It has all the information on the format in which the files are
present and the structure of the databases, the presence of external data structures,
and their relation to each other. Here, we basically save tables in memory so they
can be accessed efficiently. In order to come up with a good physical model, we
have to work on the relational model in a better way. Structured Query Language
(SQL) is used to practically implement Relational Algebra.
This Data Model describes HOW the system will be implemented using a specific
DBMS system. This model is typically created by DBA and developers. The
purpose is actual implementation of the database.
Characteristics of a physical data model:
The physical data model describes data need for a single project or application
though it maybe integrated with other physical data models based on project
scope.
Data Model contains relationships between tables that which addresses
cardinality and nullability of the relationships.
Developed for a specific version of a DBMS, location, data storage or
technology to be used in the project.
Columns should have exact datatypes, lengths assigned and default values.
Primary and Foreign keys, views, indexes, access profiles, and authorizations,
etc. are defined
Some Other Data Models
1. Hierarchical Model
The hierarchical Model is one of the oldest models in the data model which was
developed by IBM, in the 1950s. In a hierarchical model, data are viewed as a
collection of tables, or we can say segments that form a hierarchical relation. In
this, the data is organized into a tree-like structure where each record consists of
one parent record and many children. Even if the segments are connected as a
chain-like structure by logical associations, then the instant structure can be a fan
structure with multiple branches. We call the illogical associations as directional
associations.
2. Network Model
The Network Model was formalized by the Database Task group in the 1960s. This
model is the generalization of the hierarchical model. This model can consist of
multiple parent segments and these segments are grouped as levels but there exists
a logical association between the segments belonging to any level. Mostly, there
exists a many-to-many logical association between any of the two segments.
3. Object-Oriented Data Model
In the Object-Oriented Data Model, data and their relationships are contained in a
single structure which is referred to as an object in this data model. In this, real-
world problems are represented as objects with different attributes. All objects
have multiple relationships between them. Basically, it is a combination of Object
Oriented programming and a Relational Database Model.
4. Float Data Model
The float data model basically consists of a two-dimensional array of data models
that do not contain any duplicate elements in the array. This data model has one
drawback it cannot store a large amount of data that is the tables can not be of large
size.
5. Context Data Model
The Context data model is simply a data model which consists of more than one
data model. For example, the Context data model consists of ER Model, Object-
Oriented Data Model, etc. This model allows users to do more than one thing
which each individual data model can do.
6. Semi-Structured Data Model
Semi-Structured data models deal with the data in a flexible way. Some entities
may have extra attributes and some entities may have some missing attributes.
Basically, you can represent data here in a flexible way.
Advantages of Data Models
1. Data Models help us in representing data accurately.
2. It helps us in finding the missing data and also in minimizing Data
Redundancy.
3. Data Model provides data security in a better way.
4. The data model should be detailed enough to be used for building the physical
database.
5. The information in the data model can be used for defining the relationship
between tables, primary and foreign keys, and stored procedures.
Disadvantages of Data Models
1. In the case of a vast database, sometimes it becomes difficult to understand the
data model.
2. You must have the proper knowledge of SQL to use physical models.
3. Even smaller change made in structure require modification in the entire
application.
4. There is no set data manipulation language in DBMS.
5. To develop Data model one should know physical data stored characteristics.
Network Model in DBMS
The Network Model in a Database Management System (DBMS) is a data model
that allows the representation of many-to-many relationships in a more flexible and
complex structure compared to the Hierarchical Model. It uses a graph structure
consisting of nodes (entities) and edges (relationships) to organize data, enabling
more efficient and direct access paths.
What is Network Model?
This model was formalized by the Database Task group in the 1960s. This model is
the generalization of the hierarchical model. This model can consist of multiple
parent segments and these segments are grouped as levels but there exists a logical
association between the segments belonging to any level. Mostly, there exists a
many-to-many logical association between any of the two segments. We
called graphs the logical associations between the segments. Therefore, this model
replaces the hierarchical tree with a graph-like structure, and with that, there can
more general connections among different nodes. It can have M: N relations
i.e, many-to-many which allows a record to have more than one parent segment.
Here, a relationship is called a set, and each set is made up of at least 2 types of
record which are given below:
An owner record that is the same as of parent in the hierarchical model.
A member record that is the same as of child in the hierarchical model.
Structure of a Network Model
A Network data model
In the above figure, member TWO has only one owner ‘ONE’ whereas member
FIVE has two owners i.e, TWO and THREE. Here, each link between the two
record types represents 1 : M relationship between them. This model consists of
both lateral and top-down connections between the nodes. Therefore, it allows 1: 1,
1 : M, M : N relationships among the given entities which helps in avoiding data
redundancy problems as it supports multiple paths to the same record. There are
various examples such as TOTAL by Cincom Systems Inc., EDMS by Xerox
Corp., etc.
Aiming for a top All India Rank in GATE CS/IT or GATE DA 2026? Our courses,
led by experts like Khaleel Sir, Chandan Jha Sir, and Vijay Agarwal Sir,
offer live classes, practice problems, doubt support, quizzes, and All India Mock
Tests—all in one place.
Example : Network model for a Finance Department.
Below we have designed the network model for a Finance Department:
So, in a network model, a one-to-many (1: N) relationship has a link between two
record types. Now, in the above figure, SALES-MAN, CUSTOMER, PRODUCT,
INVOICE, PAYMENT, INVOICE-LINE are the types of records for the sales of a
company. Now, as you can see in the given figure, INVOICE-LINE is owned by
PRODUCT & INVOICE. INVOICE has also two owners SALES-MAN &
CUSTOMER.
Let’s see another example, in which we have two segments, Faculty and Student.
Say that student John takes courses both in CS and EE departments. Now, find
how many instances will be there?
For the above example, a student’s instance can have at least 2 parent instances
therefore, there exist relations between the instances of students and faculty
segment. The model can be very complex as if we use other segments say Courses
and logical associations like Student-Enroll and Faculty-course. So, in this model,
a student can be logically associated with various instances of Faculties and
Courses.
Advantages of Network Model
This model is very simple and easy to design like the hierarchical data model.
This model is capable of handling multiple types of relationships which can
help in modeling real-life applications, for example, 1: 1, 1: M, M: N
relationships.
In this model, we can access the data easily, and also there is a chance that the
application can access the owner’s and the member’s records within a set.
This network does not allow a member to exist without an owner which leads to
the concept of Data integrity.
Like a hierarchical model, this model also does not have any database standard,
This model allows to represent multi parent relationships.
Disadvantages of Network Model
The schema or the structure of this database is very complex in nature as all the
records are maintained by the use of pointers.
There’s an existence of operational anomalies as there is a use of pointers for
navigation which further leads to complex implementation.
The design or the structure of this model is not user-friendly.
This model does not have any scope of automated query optimization.
This model fails in achieving structural independence even though the network
database model is capable of achieving data independence.
Features of Network Model in DBMS
Data Relationship Representation: The network model uses a graph structure
to represent data relationships. It allows many-to-many relationships, providing
greater flexibility in how data is connected.
Records and Sets: Data in a network model is organized into records and sets.
Records are similar to rows in a relational table, and sets are used to define
relationships between records, akin to links in a graph.
Owner-Member Relationships: The network model defines data relationships
using owner-member pairs. An owner record can be linked to multiple member
records, and a member record can belong to multiple owner records, facilitating
complex relationships.
Navigational Access: The network model supports navigational data access,
where records are accessed through predefined paths. This is different from
relational models, which use declarative query languages like SQL.
Hierarchical and Non-Hierarchical Structures: The network model can
represent both hierarchical (tree-like) and non-hierarchical (graph-like)
structures, providing flexibility in data modeling.
Operations on Network Model in DBMS
Insertion: Adding new records and establishing owner-member relationships.
Deletion: Removing records and maintaining data integrity by handling related
records and relationships.
Update: Modifying existing records and relationships between records.
Traversal: Navigating through the network structure to access related records
using predefined paths.
Search: Retrieving specific records based on criteria by navigating the network
structure.
Difference Between the Network Model and the
Hierarchical Model
Feature Hierarchical Model Network Model
Hierarchical model
In the above-given figure, we have few students and few course-enroll and a course
can be assigned to a single student only, but a student can enroll in any number of
courses and with this the relationship becomes one-to-many. We can represent the
given hierarchical model like the below relational tables:
FACULTY Table
Nam
Dep Course-taught
e
John CSE CA
Jake CSE SE
STUDENT Table
Course-
Name Grade
enroll
Gami CA 2.0
Mary SE 3.0
Mayen SE 4.0
Example 2: Consider the below cricket database system hierarchical model
scheme.
Hierarchical model
Here, in this example, for each player, there are some set of positions
(P_POSITION) he plays, a set of places (P_PLACE), and also a set of birthdates
(P_BDATE) of the players. In the above figure, each node represents a logical
record type and is displayed by a list of its fields. The child node represents a set of
records that are connected to each record of the parent type, which is due to a
many-to-many relationship is from child to parent. In the above, figure, the root
node PLAYER states that for every player there will be a set of positions, a set of
places (only one), and a set of birthdates (which is only one).
Advantages of the hierarchical model :
As the database is based on this architecture the relationships between various
layers are logically simple so, it has a very simple hierarchical database
structure.
It has data sharing as all data are held in a common database data and therefore
sharing of data becomes practical.
It offers data security and this model was the first database model that offered
data security.
There’s also data integrity as it is based on the parent-child relationship and
also there’s always a link between the parents and the child segments.
Disadvantages of the hierarchical model :
Even though this model is conceptually simple and easy to design at the same
time it is quite complex to implement.
This model also lacks flexibility as the changes in the new tables or segments
often yield very complex system management tasks. Here, a deletion of one
segment can lead to the involuntary deletion of all segments under it.
It has no standards as the implementation of this model does not provide any
specific standard.
It is also limited as many of the common relationships do not conform to the 1
to N format as required by the hierarchical model.