Post Graduate Diploma in Computer Application (PGDCA: KSKV Kutch University
Post Graduate Diploma in Computer Application (PGDCA: KSKV Kutch University
DBMS
Post Graduate Diploma in Computer Application (PGDCA
KSKV kutch University
DBMS 2
Data
o. Data are raw facts. The word raw indicate that the facts
have not yet been processed to reveal meaning
What is DBMS
o. A Database Management System is a collection of
programs that manage the database structure and controls
access to the data stored in the database
o Its allows to
o create databases
o insert , update and delete data
o sort and query data
o create form and reports
DBMS 5
Schema
o The description of a database is called database schema.
Instance
oThe data in the database at a particular moment in time is
called database state.
Superkey
o An attribute that uniquely identifies each row in a table.
o E.g. :- cust_name and cust_id.
Candidate key
o A minimal superkey. A superkey that does not contain a
subset of attributes that is itself a superkey. E.g. :- cust_id
Primary Key
o A candidate key selected to uniquely identify all other
attribute values in any given row. Cannot contain null entries
Unique Key
o A candidate key selected to uniquely identify all other
attribute values in any given row
o Can accept unique or null values.
DBMS 8
Foreign key
o An attribute in one table whose values must either match
the primary key in another table or be null.
Field
o A character or group of characters that has a specific
meaning. A filed is used to define and store data.
Record
o A logically connected set of one or more fields that
describes a person, place, or thing
File
o A collection of related record.
DBMS 9
Database Applications
Railway Reservation
Library Management System
Banking
Schools and colleges
Social media sites
Telecommunication
Finance
Online shopping
DBMS 1
0
What is data abstraction? Describe the levels briefly.
Physical Level:
How the data are
stored. Conceptual Level:
E.g. index, B-tree, (
hashing. Next highest level of
Lowest level of abstraction. View Level:
abstraction. Describes what data (
Complex low-level are stored. Highest level.
structures described in Describes the Describes part of the End-user View
detail. relationships among database for a particular
data. group of users. This level represents
Hierarchical Model
• in the hierarchical model, data is organized as an inverted tree,
Each entity has only one parent but can have several children. At
the top of the hierarchy , there is one entity, which is called the root
DEPARTMENT
No Name
PROFESSORS ID Name
ID Name
PROFESSORS
DBMS tree like structure
1
5
Data Models and Types of Data Models
one parent may have multiple child but
the child will have only parent
Hierarchical Model
complex implementation
difficult to manage
lack of structure independence
complex application programing
limitation in implementation
Data depended on parent or root element
DBMS 1
8
Data Models and Types of Data Models
Network model
• In the network model, the entities are organized in a graph, in which
some entities can be accessed through several paths
Network model
DBMS 1
9
Data Models and Types of Data Models
Network model
Graph structure
Simple design
Easy to access
Data independence
-Application programmers work independently of the data
-Any change made to the data do not affect application
programme
DBMS 2
1
Data Models and Types of Data Models
Relational model
DBMS 2
2
Data Models and Types of Data Models
Attribute
The resulting groups of data are organized and are much easier
for people to understand.
Relational model
DBMS 2
4
Data Models and Types of Data Models
Owns Movies
Studios
Stars-in Star
name year
address address
name
title length filmType
ER model
DBMS •
•
Entities
Relationships
and their attributes.
among entities
2
5
Data Models and Types of Data Models
ER Model is based on
Entity – An object that exists or abstraction of similar things,
e.g. cars, students or people
Or – Distinguishable “thing” in the real world
name Attribute
Relationship
Is-insured Type
DBMS 2
6
Data Models and Types of Data Models
ER Model Diagram
access-date
cust-name number
cust-id
cust-street
cust-city balance
DBMS 2
7
Data Models and Types of Data Models
DDL
create, alter, drop, truncate, rename ,commit
DCL
grant , revoke
DML
insert, update , delete
KSKV kutch University
PGDCA (Post Graduate Diploma in Computer Application
To be Continue…..Unit 2