Escolar Documentos
Profissional Documentos
Cultura Documentos
Dharmendra Arora
Recap
Database
1 1 0 0 0 1 0 0 Bits
JIM Dharmendra
Arora
Traditional File System
Each information need facilitated by specific
application associated to a specific master file
Which resulted in:
Data Redundancy-same info in more than one files
Lack Of Data Integration-collation of information from more
than one files not possible
Program/Data Dependence-adding data field required
change in program, data management scattered among
application programs
Lack of Flexibility-scheduled reports & queries to retrieve
data
Dharmendra
Arora
What is Database?
Physical collection of
data
(Must be stored on direct access devices)
Dharmendra
Arora
Why Database
Avoid redundancy
Remove Inconsistency
Sharing & Synchronization of data
Security
Data independence
Etc.
Dharmendra
Arora
Database Management System
Centralised data management software
Mechanism for organising, structuring &
storing data
Set of programs that serve an interface
between application programs and
database (set of coordinated and
integrated physical files)
DBMS provides capabilities of creating,
maintaining and changing the database
Dharmendra
Arora
Dharmendra Arora India Rajasthan 211111
Personal
DBMS
Professional
Query Database
Language
Financial
Users Reports
Dharmendra
Arora
Who Are The Users?
End User-Logical view
Application Programmer-Logical/Physical
view
Database Administrator-for overall control of
Db.
Data dictionary
Physical structure
Updation of database
Security & recovery
Access control
Etc.
Dharmendra
Arora
Logical & Physical Views
Physical view-physical layout of the
database records; actual records of bits,
bytes on memory devices. Used by
technical people to optimise memory
devise for space and performance.
Logical view- data represented in user-
desired format.
Dharmendra
Arora
Elements of DBMS
Dharmendra
Arora
Data Definition Language (DDL)
Means by which the content & format of
data to be stored is described; and the
structure of db is defined.
It is essentially a link between Logical
view and physical views of database.
Dharmendra
Arora
JIM Dharmendra
Arora
JIM Dharmendra
Arora
Data Manipulation Language (DML)
Set of procedural commands that allow
the user to store, retrieve and amend the
database.
Eg. Select * from personal_info;
Dharmendra
Arora
Utilities & Ancillary Software
Physical administration of database
Wizards for reports etc.
Dharmendra
Arora
Database Models
It defines the way/fashion in which the
data is structured/coordinated-the way
related data is tied together.
3 major models
1. Relational Database-based on relational theory
2. Hierarchical Database-based on graph theory
3. Network Database-based on graph theory
Dharmendra
Arora
Relational Database
Introduced by Codd in early 1970s
Composed of one or more relations. Each can be
visualised as a table of data or file.
Each row (tuple) in the relation represents one
entity.
Each column name represents attribute.
The value of an attribute is called an item.
In any relation no two rows can be identical.
An attribute or set of attributes whose value
uniquely identify a row of a relation is called a key.
Dharmendra
Arora
Example of Relational Db
Dharmendra
Arora
Hierarchical Database
Data represented by tree-structure type of
organisation.
The hierarchical tree specifies what record
types are allowed to be included in the
database and the permissible relations
between record types.
Any record other than the root or the tree
must be connected with a parent record.
When a record is deleted, all the descendants
of the records are also deleted.
Dharmendra
Arora
Example of Hierarchical Db
Course # Title course
StuName students
Dharmendra
Arora
Network Database
Generalisation of hierarchical model.
In this a segment can have multiple
parent segments.
Many-to-many structure rather than one-
to-many.
Dharmendra
Arora
Example of Hierarchical Db
Course # Title course
hascon hastea
corpre
attends
takestest
StuName students
Dharmendra
Arora
Which model to use
Ease of use-relational
Efficiency of implementation-others
Dharmendra
Arora