0% found this document useful (0 votes)
47 views

DBMS Unit 1

1) The document provides information about databases and database management systems (DBMS). It defines what data and a database are, and explains that a database stores data in an organized format. 2) A DBMS is software that allows users to create and manage databases. It defines the database, stores and retrieves data, supports query languages, and creates interfaces for data entry. 3) Examples of database applications include library management systems, banking systems, university administration systems, and telecommunications systems. All of these rely on databases and DBMS to store and manage large amounts of complex data.

Uploaded by

Nishita Pandey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

DBMS Unit 1

1) The document provides information about databases and database management systems (DBMS). It defines what data and a database are, and explains that a database stores data in an organized format. 2) A DBMS is software that allows users to create and manage databases. It defines the database, stores and retrieves data, supports query languages, and creates interfaces for data entry. 3) Examples of database applications include library management systems, banking systems, university administration systems, and telecommunications systems. All of these rely on databases and DBMS to store and manage large amounts of complex data.

Uploaded by

Nishita Pandey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

DBMS UNIT 1

Prepared By:
Ms. Barkha Namdev
What is Data?

Data is a collection of a distinct small unit of information.


It can be used in a variety of forms like text, numbers,
media, bytes, etc. it can be stored in pieces of paper or
electronic memory, etc.

Word 'Data' is originated from the word 'datum' that


means 'single piece of information.' It is plural of the
word datum.

In computing, Data is information that can be translated


into a form for efficient movement and processing. Data
is interchangeable.
What is Database?
The database is an organized collection of related
information. It stores information in standard format.

A database is an organized collection of data, so that it


can be easily accessed and managed.

You can organize data into tables, rows, columns, and


index it to make it easier to find relevant information.

Database handlers create a database in such a way


that only one set of software program provides access of
data to all the users.
What is Database?
The main purpose of the database is to operate a
large amount of information by storing, retrieving,
and managing data.

There are many dynamic websites on the World


Wide Web nowadays which are handled through
databases. For example, a model that checks the
availability of rooms in a hotel. It is an example of
a dynamic website that uses a database.
What is Database?
There are many databases available like MySQL
1. Sybase
2. Oracle
3. MongoDB
4. Informix
5. PostgreSQL
6. SQL Server

Modern databases are managed by the database


management system (DBMS).
Properties of Database
A database represent some expect of real world.
A database is design, built and populated with
data for some specific purpose.
Database is a logical collection of data.
A single database can be related to another
database.
The size of database can be a very large.
It is very less complex.
It gives a facility to user to perform a Varity of
operations.
Database Management system
(DBMS):
It is a collection of program that enable user to
create and maintained the database. It is a
general purpose software system that provide so
many facility.
It is a software that define a database, store the
data, support query language and create data
entry screen.
DBMS is a software that can be use to setup the
database and can manage the updating and
retrieval data that has been stored in it.
Operation of DBMS
Create new database.
Insert new data into existing database.
Retrieving data from existing database.
Updating data in existing database.
Deleting data from existing database.
It support multiple view of data.
Maintain relationships between database.
To store large amount of data in proper format.
Various reports can be produced by the database.
Remove database from DBMS.
Difference b/w File System & DBMS
Difference b/w File System & DBMS
Difference b/w File System & DBMS
Advantages of DBMS:
1. 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.
2. Data Sharing
Data can be shared between authorized users of
the database in DBMS. All the users have their
own right to access the database. Admin has
complete access to the database. He has a right
to assign users to access the database.
Advantages of DBMS:
3.Backup
It provides backup and recovery subsystems which
create automatic backup of data from hardware and
software failures and restores the data if required.

4.Reduce time: It reduces the maintenance need and


development time.
Disadvantages of DBMS:
Cost of Hardware and Software
It requires a high speed of data processor and
large memory size to run DBMS software.

Size
It occupies a large space of disks and large
memory to run them efficiently. The functionality of
DBMS makes use of a large piece of software
which occupies megabytes of disk space
Advantages of DBMS:
Minimized Data Inconsistency: Data inconsistency
occurs between files when different versions of the
same data appear in different places. For Example, data
inconsistency occurs when a student’s name is saved as
“John Wayne” on a main computer of the school but on
the teacher registered system same student name is
“William J. Wayne”,
Disadvantages of DBMS:
Complexity
The provision of the functionality that is expected
of a good DBMS makes the DBMS an extremely
complex piece of software. Database designers,
developers, database administrators and
end-users must understand this functionality to
take full advantage of it.
Failure to understand the system can lead to bad
design decisions, which leads to a serious
consequence for an organization.
Disadvantages of DBMS:
Reliability
A database management system is more
vulnerable to failure since the complete structure
is dependent on the database. Any damages to
the database could stop the functioning of all the
application programs. Even if one the component
starts malfunctioning, that will stop the entire
operations.
Disadvantages of DBMS:
Management
Once the user has implemented the database system,
the complications does not stop there. Whatever the
changes that occurs in the database system must be
managed accordingly. It requires proper management
from experienced staffs. The staffs should be well
aware of the location where the data needs to be located
and saved.
Applications of DBMS
Railway Reservation System − The railway reservation
system database plays a very important role by keeping
record of ticket booking, train’s departure time and
arrival status and also gives information regarding train
late to people through the database.

Library Management System − Now-a-days it’s


become easy in the Library to track each book and
maintain it because of the database. This happens
because there are thousands of books in the library. It is
very difficult to keep a record of all books in a copy or
register. Now DBMS used to maintain all the information
related to book issue dates, name of the book, author
and availability of the book.
Applications of DBMS
Banking − Banking is one of the main applications of
databases. We all know there will be a thousand
transactions through banks daily and we are doing this
without going to the bank. This is all possible just because
of DBMS that manages all the bank transactions.

Universities and colleges − Now-a-days examinations are


done online. So, the universities and colleges are
maintaining DBMS to store Student’s registrations details,
results, courses and grade all the information in the
database. For example, telecommunications. Without
DBMS there is no telecommunication company. DBMS is
most useful to these companies to store the call details and
monthly postpaid bills.
Schema
The description of data base is called database
schema which is specified during database design
and is not expected to change frequently . It is
also called relation.
In schema design we determine the fields and its
type and its length.
Schema display the information of field but it can’t
represent the record .
Ex. Student(Roll No, Name, Class, subject)
It describe the structure of table.
Instance
The collection of information stored in the database at a
particular moment of time is called instance of the data
base
Databases change over time as information is inserted
or deleted.
DBMS Architecture
For representation of data in the database an
architecture is defined which is called this system
architecture of database system.
This is the generalized architecture of ANSI SPARC
model , this architecture is divided in 3 parts .
The view of each of there level is described by
scheme , it is a plan that describe the record and
relationships existing in the view .
View of Data
An architecture for a database system
ANSI/SPARC Architecture
Users

External External External External


Schema view view view

Conceptual Conceptual
view
Schema

Internal Internal view


Schema
Internal level
This level describes physical storage structure of a database
, it describes complete details of data storage and access
path for the database .
It also specifies what end user exist , how stored fields are
represented and what is the physical sequence of the stored
record .
In this level we can also determine the length of fields , it
describes the data structure and access method to be used
by the database.
The internal view is expressed by internal schema , which
contains the definition of stored record & also contain the
method of representing the data field . This view is handle
by the DBA.
Field Name Data Type Length Constraints

Name : Varchar Length =25 Not Null

ID : Int Length=6 Primary K

Dept : Varchar Length=10

Address : Varchar Length=30


Conceptual View
This is the next higher level of DBMS.
This level describe the structure of complete
database , it describes what data are actually stored
in database.
This level contain information about entire data base
in terms of a small number of relatively simple
structure .
This level works between internal & external level , it
is a process of transforming information between
levels .
It hides the details of physical storage structure and
describe Entity , data type and relationships.
Field Datatype
Name : Varchar

ID : Int

Dept : Varchar

Address : Varchar
External View
This level is used by individual user , it is the highest
level of database , any number of users can work on
this level.

It describes the part of data base which is useful to


user and hides the list of database .

This level is different for different user, this data is


used by user to gets some information, it shows only
the name of entity. This means it shows only logical
record.
Field Name
Name

ID

Dept

Address

Salary
DBMS Language
For programming we use language, Language use so many
command, and instruction and for different – different
operation we use different – different commands same as if
we want to operate the database then we use DBMS
language.
It also provides so many command & syntax and for
different –different operation we use different –different
command.
DBMS language classified into 4 type
DDL ( Data Definition Language)
DML( Data Manipulation Language)
DCL ( Data Control Language
TCL (Transaction Control Language)
DDL ( Data Definition Language)
This language is used to define the data structure of table
with the help of DDL we can create the new table , delete
the table & change the structure of tables.
The DDL operates on structure which are used to store
data in the database .
“ It contains a sets of definition which is expressed by a
special language called data definition language”. In this
language we use so many command such as
Create , Drop , Alter .
DML ( Data Manipulation Language)
This language is used to manipulate the database , in this
language we perform display , insert , modify & delete
operation in the table.
This means with the help of this language we can insert the
data in a table , we can change the record of table and we
can also delete the record of table.
DML are of 2 types :
1. Procedural DML
2. Non-Procedural DML
Data Control Language (DCL) :
This language is used to control the user to access the data
base that’s it gives the permission to user.
All the security to the database are provide by data control
language .
DCL is collection of some statement which are used to
control the data object creating using DDL statement . The
most common control statements are Grant & Revoke .
Transaction Control Language
This language is used to control the transactions of
users. If users apply some transaction operation on the
table then to maintain transaction we use it.
Example – commit, rollback
DATA INDEPENDENCY
In DBMS create so many database ,and in this database
we store the records when we create any database or table .
Then 1st define the schema or relation , and after that we
enter the data.
If we change the database then we can change the schema
or we can change the records, when we change the schema
then other schema are not change this concept is called
data independency.
Types of independency
1. Logical data independency
2. Physical data independency
Physical Data Independency
When the physical storage structure or devices used for
storing data can be changed with affecting the
conceptual schema or any of the external view . This
means physical data independency has the capacity to
change the internal schema without having to change the
conceptual or external schema .
Logical Data Independency
When the conceptual schema can be change without
effecting the existing internal schema is called logical data
independency , Conceptual schema is change to expand
database or to remove records or data item.
But this addition or deletion does not effect internal view ,
This independency also insulates application programs
from operation such as combining two records in to 1
records or splitting an existing records in to 2 or more
records .
Data Model
Data Model gives us an idea that how the final system
will look like after its complete implementation. It
defines the data elements and the relationships between
the data elements. Data Models are used to show how
data is stored, connected, accessed and updated in the
database management system.
Data Model
1. Hierarchical Model
2. Network Model
3. Entity-Relationship Model
4. Relational Model
Data Model
Hierarchical Model was the first DBMS model. This
model organises the data in the hierarchical tree
structure. The hierarchy starts from the root which has
root data and then it expands in the form of a tree
adding child node to the parent node.
Hierarchical Model
Hierarchical Model was the first DBMS model. This
model organises the data in the hierarchical tree
structure. The hierarchy starts from the root which has
root data and then it expands in the form of a tree
adding child node to the parent node.
Hierarchical Model
Example: We can represent the relationship between the shoes
present on a shopping website in the following way:
Hierarchical Model
Advantages of Hierarchical ModelIt is very simple and
fast to traverse through a tree-like structure.
Any change in the parent node is automatically
reflected in the child node so, the integrity of data is
maintained.
Hierarchical Model
Disadvantages of Hierarchical ModelComplex
relationships are not supported.
As it does not support more than one parent of the child
node so if we have some complex relationship where a
child node needs to have two parent node then that can't
be represented using this model.
If a parent node is deleted then the child node is
automatically deleted.
Network Model
This model is an extension of the hierarchical model. It
was the most popular model before the relational
model. This model is the same as the hierarchical
model, the only difference is that a record can have
more than one parent.
Network Model
Example: In the example below we can see that node
student has two parents i.e. CSE Department and
Library. This was earlier not possible in the hierarchical
model.
Network Model
The data can be accessed faster as compared to the
hierarchical model. This is because the data is more
related in the network model and there can be more
than one path to reach a particular node. So the data can
be accessed in many ways.
As there is a parent-child relationship so data integrity
is present. Any change in parent record is reflected in
the child record.
Network Model
As more and more relationships need to be handled the
system might get complex. So, a user must be having
detailed knowledge of the model to work with the
model.
Any change like updation, deletion, insertion is very
complex.
Entity-Relationship Model
Entity-Relationship Model or simply ER Model is a
high-level data model diagram. In this model, we
represent the real-world problem in the pictorial form
to make it easy for the stakeholders to understand. It is
also very easy for the developers to understand the
system by just looking at the ER diagram. We use the
ER diagram as a visual tool to represent an ER Model.
Entity-Relationship Model
ER Model. ER diagram has the following three
components:
Entities: Entity is a real-world thing. It can be a person,
place, or even a concept. Example: Teachers, Students,
Course, Building, Department, etc are some of the
entities of a School Management System.
Attributes: An entity contains a real-world property
called attribute. This is the characteristics of that
attribute. Example: The entity teacher has the property
like teacher id, salary, age, etc.
Entity-Relationship Model
Relationship: Relationship tells how two attributes are
related. Example: Teacher works for a department.
Example:
Entity-Relationship Model
In the above diagram, the entities are Teacher and
Department. The attributes of Teacher entity are
Teacher_Name, Teacher_id, Age, Salary,
Mobile_Number. The attributes of
entity Department entity are Dept_id, Dept_name. The
two entities are connected using the relationship. Here,
each teacher works for a department.
Entity-Relationship Model
Advantages of ER ModelSimple: Conceptually ER
Model is very easy to build. If we know the relationship
between the attributes and the entities we can easily
build the ER Diagram for the model.
Effective Communication Tool: This model is used
widely by the database designers for communicating
their ideas.
Entity-Relationship Model
Disadvatages of ER ModelNo industry standard for
notation: There is no industry standard for developing
an ER model. So one developer might use notations
which are not understood by other developers.
Hidden information: Some information might be lost
or hidden in the ER model. As it is a high-level view so
there are chances that some details of information
might be hidden.
Relational Model
Relational Model is the most widely used model. In this
model, the data is maintained in the form of a
two-dimensional table. All the information is stored in
the form of row and columns. The basic structure of a
relational model is tables. So, the tables are also
called relations in the relational model. Example: In
this example, we have an Employee table.
Relational Model
Relational Model
Features of Relational ModelTuples: Each row in
the table is called tuple. A row contains all the
information about any instance of the object. In the
above example, each row has all the information
about any specific individual like the first row has
information about John.
Attribute or field: Attributes are the property
which defines the table or relation. The values of
the attribute should be from the same domain. In
the above example, we have different attributes of
the employee like Salary, Mobile_no, etc.
Relational Model
Advnatages of Relational Model
Simple: This model is more simple as compared to
the network and hierarchical model.
Scalable: This model can be easily scaled as we can
add as many rows and columns we want.
Structural Independence: We can make changes in
database structure without changing the way to
access the data. When we can make changes to the
database structure without affecting the capability to
DBMS to access the data we can say that structural
independence has been achieved.
The people who are accessing or working with the
database are called database users and administrators.
We know that the primary aim of the DBMS is to store
the data or information and retrieve whenever it is
needed by the database users.
Database Users and Administrators
Those who are working with the database can be
categorized into two; the database users and the
database administrators.
Database User
The database users also can be categorized again into
five groups according to how they interact with the
database. They are:
Specialized Users
Application Programmers
Sophisticated Users
Specialized Users
Stand-alone Users
Native User
These are the database users who are
communicating with the database through an
already written program.
For example, when a student is registering on a
website for an online examination. He creates
data in the database by entering and submitting
his name, address and exam details.
Application Programmer
These are the software developers and
programming professionals who write the program
codes.
Sophisticated Users
Sophisticated users are those who are creating the
database. These type of users do not write program
code. And they do not use any software to request the
database.
The sophisticated users directly interact with the
database system using query languages like SQL.
Specialized User
The sophisticated users who write
special database application programs are called
specialized users. The write complex programs for
the specific complex requirements.
Stand Alone User
Those who are using database fo personal usage.
There are many database packages for this type
database users.
DBA(DATABASE ADMINISTRATOR)
The person who has the central control over a
database system is called Database
Administrator (DBA).
The database administrator has the following
functions in a database system.
Schema Definition: The database administrator
creates the original database schema by
executing a set of data definition statements in
DDL
FUNCTIONS OF DBA
Storage structure an access method definition.
Schema and physical or organization
modification: The database
administrator performs the changes to the schema
according to the needs of organizations or
physical needs to improve the database
performance.
FUNCTIONS OF DBA
Provide the granting of authorization to access
data: The database administrator can decide the
which parts of the database can be accessed by a
user, by using the different types of authorization
methods.
Database maintenance: The database
maintenance includes the following processes.
Regular backing up of the database.
Ensuring the disk space for performing the
required operations.
Monitoring the jobs running on the database.

You might also like