Database Management System
Database Management System
1
Concept of Database
A database is a collection of data.
2
Advantages of DBMS
1)Data Redundancy :- Data redundancy means
Duplication of data.
A DBMS keeps data at one place and users can access
from there.
2)Data consistency:-
Data redundancy leads to inconsistency.
Inconsistency can be controlled by controlling data
redundancy.
3)Efficient data access:-
A DBMS provides an efficient access to database.
3
Advantages of DBMS
4)Data integrity:-
Data integrity refers to correctness of data stored in the
database.
5)Data Security:-
Data security can be done by using passwords.
6)Sharing of data:-
Data can be shared among multiple programs and
users.
7)Enforces standard:-
standards may be laid by the organization or individual.
4
Components of DBMS
1)Hardware:-
computers(Server) and storage devices
2)Software:-
application programs and utilities.
3)Data:-
The data is organized in the form of Field,Record and
Files.
4)Users:-classified into four types:
Data Base Administrator(DBA),Application
Programmer,Sophisticated user and Naive user.
5
Structure of DBMS
Data is organized as Field,Record and Files.
6
Database Abstraction
7
Database Abstraction
A database system is designed using three levels of
abstraction,Physical Level,Logical Level,View Level.
1)Physical Level(Internal Level):-
It is the lowest level of abstraction.
howdata is actually stored
2)Logical Level(Conceptual Level):-
also called global view.
Represents the entire database.
what data are stored in the database and the
relationship between data.
3)View Level(External Level):- 8
Different users in database
Database Administrator(DBA)
Application Programmer
Sophisticated Users
Naive Users
9
Different users in database
Database Administrator(DBA)
A person who has central control over the database.
10
Different users in database
Application Programmer:
Naive users:-
Naive users are unsophisticated users.
They interact with database by invoking previously
written application programs.
11
Data Independence
Data independence is the ability to modify the schema
definition(Data structure definition) in one level without
effecting the schema definition at the next higher level.
Physical data independence:
The applications need not worry about how the data are
physically structured and stored
12
Relational data model
Represents database as a collection of relations(tables)
15
Keys
A key is an attribute or collection of attributes that
uniquelly identifies each record(Tuple) in a table.
17
Relational Algebra
A collection of operations used to manipulate table
content.
18
Relational Algebra
1) SELECT Operation:-
Selects rows from a table that satisfies a specific
condition.
It is denoted by Sigma(σ).
2) PROJECT Operation:-
Selects attributes(Columns) from a table.
It is denoted by Pi( π)
3) Cartesian Product Operation:-
Combines tuples from two relations.
19 by X(cross).
It is a binary operation and is denoted
Relational Algebra
4) UNION Operation:-
Retains a relation consisting of all tuples from both the
relations.
It is denoted by U .
tables having same number and types of attributes.
20
Relational Algebra
5) INTERSECTION Operation:-
returns a relation consisting of all tuples common to
both the relations.
It is a binary operation denoted by ∩.
R INTERSECTION S
21
Relational Algebra
6) SET DIFFERENCE Operation:-
Returns a relation consisting of all tuples appearing in
the first relation and not in the second relation.
It is denoted by ' - '
22