Unit-1 (Part-1)
Unit-1 (Part-1)
Unit-1 (Part-1)
Introduction to DBMS
Database Management System
Database Management System DBMS is a software for storing and retrieving
users' data while considering appropriate security measures. It consists of a
group of programs which manipulate the database. The DBMS accepts the
request for data from an application and instructs the operating system to
provide the specific data. In large systems, a DBMS helps users and other
third-party software to store and retrieve data.
DBMS allows users to create their own databases as per their requirement. The
term “DBMS” includes the user of the database and other application
programs. It provides an interface between the data and the software
application.
Data stored into Tables: Data is never directly stored into the database.
Data is stored into tables, created inside the database. DBMS also allows to
have relationships between tables which makes the data more meaningful
and connected. You can easily understand what type of data is stored
where by looking at all the tables created in a database.
Unit 1 - Part 1 1
Reduced Redundancy: In the modern world hard drives are very cheap, but
earlier when hard drives were too expensive, unnecessary repetition of
data in database was a big problem. But DBMS
follows Normalisation which divides the data in such a way that repetition
is minimum.
Data Consistency: On Live data, i.e. data that is being continuosly updated
and added, maintaining the consistency of data can become a challenge.
But DBMS handles it all by itself.
Security: The DBMS also takes care of the security of data, protecting the
data from un-authorised access. In a typical DBMS, we can create user
accounts with different access permissions, using which we can easily
secure our data by restricting user access.
Advantages of DBMS
DBMS offers a variety of techniques to store & retrieve data
Unit 1 - Part 1 2
The DBMS implies integrity constraints to get a high level of protection
against prohibited access to data.
Disadvantages of DBMS
DBMS may offer plenty of advantages but, it has certain flaws-
Use of the same program at a time by many users sometimes lead to the
loss of some data.
Unit 1 - Part 1 3
1. External level
It is also called view level. The reason this level is called “view” is because
several users can view their desired data from this level which is internally
fetched from database with the help of conceptual and internal level mapping.
The user doesn’t need to know the database schema details such as data
structure, table definition etc. user is only concerned about data which is what
returned back to the view level after it has been fetched from database
(present at the internal or the physical level).
2. Conceptual level
It is also called logical level. The whole design of the database such as
relationship among data, schema of data etc. are described in this level.
Database constraints and security are also implemented in this level of
architecture. This level is maintained by DBA (database administrator).
3. Internal level
This level is also known as physical level. This level describes how the data is
actually stored in the storage devices. This level is also responsible for
allocating space to the data. This is the lowest level of the architecture.
Unit 1 - Part 1 4
Data Independence
Data Independence refers to the 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:
Unit 1 - Part 1 5
These commands are used to update the database schema that's why they
come under Data definition language.
Database Models
A Database model defines the logical design and structure of a database and
defines how data will be stored, accessed and updated in a database
management system. While the Relational Model is the most widely used
database model, there are other models too:
Hierarchical Model
Network Model
Entity-relationship Model
Relational Model
Hierarchical Model
This database model organizes data into a tree-like-structure, with a single
root, to which all the other data is linked. The hierarchy starts from
the Root data, and expands like a tree, adding child nodes to the parent nodes.
In this model, a child node will only have a single parent node.
Unit 1 - Part 1 6
In hierarchical model, data is organized into tree-like structure with one one-to-
many relationship between two different types of data, for example, one
department can have many courses, many professors and of-course many
students.
Network Model
This is an extension of the Hierarchical model. In this model data is organized
more like a graph, and are allowed to have more than one parent node.
In this database model data is more related as more relationships are
established in this database model. Also, as the data is more related, hence
accessing the data is also easier and fast. This database model was used to
map many-to-many data relationships.
This was the most widely used database model, before Relational Model was
introduced.
Unit 1 - Part 1 7
Entity-relationship Model
In this database model, relationships are created by dividing object of interest
into entity and its characteristics into attributes. Different entities are related
using relationships.
ER Models are defined to represent the relationships into pictorial form to
make it easier for different stakeholders to understand.
This model is good to design a database, which can then be turned into tables
in relational model.
Relational Model
In this model, data is organized in two-dimensional tables and the relationship
is maintained by storing a common field. This model was introduced by E.F
Codd in 1970, and since then it has been the most widely used database
model, in fact, we can say the only database model used around the world.
The basic structure of data in the relational model is tables. All the information
related to a particular type is stored in rows of that table.
Hence, tables are also known as relations in relational model.
Unit 1 - Part 1 8
Object Oriented Data Model
To represent the complex real world problems there was a need for a data
model that is closely related to real world. Object Oriented Data Model
represents the real world problems easily.
In Object Oriented Data Model, data and their relationships are contained in a
single structure which is referred as object in this data model. In this, real world
problems are represented as objects with different attributes. All objects have
multiple relationships between them.
Unit 1 - Part 1 9
Unit 1 - Part 1 10