Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

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.

DBMS vs Flat File Management System

Characteristics of Database Management System


A database management system has following characteristics:

 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.

 Support Multiple user and Concurrent Access: DBMS allows multiple


users to work on it(update, insert, delete data) at the same time and still
manages to maintain the data consistency.

 Query Language: DBMS provides users with a simple Query language,


using which data can be easily fetched, inserted, deleted and updated in a
database.

 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.

 DBMS supports transactions, which allows us to better handle and


manage data integrity in real world applications where multi-threading is
extensively used.

Advantages of DBMS
DBMS offers a variety of techniques to store & retrieve data

DBMS serves as an efficient handler to balance the needs of multiple


applications using the same data

Uniform administration procedures for data

Application programmers never exposed to details of data representation


and storage.

A DBMS uses various powerful functions to store and retrieve data


efficiently.

Offers Data Integrity and Security

Unit 1 - Part 1 2
The DBMS implies integrity constraints to get a high level of protection
against prohibited access to data.

A DBMS schedules concurrent access to the data in such a manner that


only one user can access the same data at a time

Reduced Application Development Time

Disadvantages of DBMS
DBMS may offer plenty of advantages but, it has certain flaws-

Cost of Hardware and Software of a DBMS is quite high which increases


the budget of your organization.

Most database management systems are often complex systems, so the


training for users to use the DBMS is required.

In some organizations, all data is integrated into a single database which


can be damaged because of electric failure or database is corrupted on the
storage media

Use of the same program at a time by many users sometimes lead to the
loss of some data.

DBMS can't perform sophisticated calculations

Database System Architecture


Data Abstraction
The need for efficiency has led database system developers to use complex
data structures to represent data in the database. Since many database
system users are not computer trained, developers hide the complexity from
users through several levels of data abstraction, to simplify user interactions
with the system.

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:

Logical Data Independence


Logical data independence refers characteristic of being able to change the
conceptual schema without having to change the external schema. Logical
data independence is used to separate the external level from the conceptual
view. If we do any changes in the conceptual view of the data, then the user
view of the data would not be affected. Logical data independence occurs at
the user interface level.

Physical Data Independence


Physical data independence can be defined as the capacity to change the
internal schema without having to change the conceptual schema. If we do any
changes in the storage size of the database system server, then the
Conceptual structure of the database will not be affected. Physical data
independence is used to separate conceptual levels from the internal levels.
Physical data independence occurs at the logical interface level.

Data Definition Language (DDL)


DDL or Data Definition Language actually consists of the SQL commands that
can be used to define the database schema. It simply deals with descriptions
of the database schema and is used to create and modify the structure of
database objects in the database.

Here are some tasks that come under DDL

Create: It is used to create objects in the database.

Alter: It is used to alter the structure of the database.

Drop: It is used to delete objects from the database.

Truncate: It is used to remove all records from a table.

Rename: It is used to rename an object.

Comment: It is used to comment on the data dictionary.

Unit 1 - Part 1 5
These commands are used to update the database schema that's why they
come under Data definition language.

Data Manipulation Language (DML)


The SQL commands that deals with the manipulation of data present in the
database belong to DML or Data Manipulation Language and this includes most
of the SQL statements.
Here are some tasks that come under DML

Select: It is used to retrieve data from a database.

Insert: It is used to insert data into a table.

Update: It is used to update existing data within a table.

Delete: It is used to delete all records from a table.

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

Object Oriented Data 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.

This model efficiently describes many real-world relationships like index of a


book, recipes etc.

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.

ER 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.

Let's take an example, If we have to design a School Database,


then Student will be an entity with attributes name, age, address etc.
As Address is generally complex, it can be
another entity with attributes street name, pin-code, city, etc. and there will
be a relationship between them.

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

You might also like