1
DBMS
Post Graduate Diploma in Computer Application (PGDCA
KSKV kutch University
DBMS 2
Basic Concepts – Data , information, database and DBMS
Data
o. Data are raw facts. The word raw indicate that the facts
have not yet been processed to reveal meaning
o A data is known as the row fact which is stored in
computers memory and used by the user as the output.
Information
o Meaningful form of Data
o. Information is the result of processing raw data to reveal
its meaning.
o Collection of data its called information.
Example-House no 21C-S-1,Sch No 78 Indore
DBMS 3
Basic Concepts – Data , information, database and DBMS
Database: Logically related and similar data
o A collection of inter related data its called database.
o A database is a shared , integrated computer structure
that store a collection of end-user data and metadata
o A database is a collection of related data and data is
known as facts that can be recorded and that have implicit
meaning
o A database can be of any size and complexity
o A database may be generated and maintained manually or
it may be computerized.
DBMS 4
Basic Concepts – Data , information, database and DBMS
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
Basic Concepts – Data , information, database and DBMS
Schema
o The description of a database is called database schema.
o A database schema is specified during database design and
is not expected to change frequently
Instance
oThe data in the database at a particular moment in time is
called database state.
oA database is generally used by many users where insertion
and deletion of data occurs frequently. Overall information
stored in a database at a particular moment is called the
instance of the database.
DBMS 6
Basic Concepts – Data , information, database and DBMS
Role and Advantages of DBMS
Improved Data Sharing
Improved Data security
Minimized data inconsistency
Improved Data Access
Improved decision making
Increased end-user productivity .
Reduce application development time
DBMS 7
Basic Concepts – Data , information, database and DBMS
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
Basic Concepts – Data , information, database and DBMS
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
Basic Concepts – Data , information, database and DBMS
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.
Data Abstraction Levels (i.e 2)
DBMS 1
1
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
Database Can be many different only a part of the entire
administrator level. views of a database. database
E.g. tellers in a bank
get a view of customer
accounts, but not of
payroll data.
DBMS 1
2
What is data abstraction? Describe the levels briefly.
Data Abstraction Levels
DBMS 1
3
Data Models and Types of Data Models
Definition - What does Database Model mean?
Data Model
A database model shows the logical structure
of a database, including the relationships and
constraints that determine how data can be stored
and accessed
A Database model defines the logical design of
data. The model also describe the relationships between
different parts of the data.
A database model refers to the logical structure,
representation or layout of a database and how the data
will be stored, managed and processed within it. It helps
in designing a database and serves as blueprint for
application developers and database administrators in
creating a database
DBMS 1
4
Data Models and Types of Data Models
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
• The hierarchical data model organizes data in a tree structure
DEPARTMENT
No Name
COURSES No Name Unit ID Name Course STUDENTS
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
The hierarchical model was the first database model developed to
overcome the limitations of the traditional file system
Deletion of parent results in deletion of child records
The hierarchical models was developed in the 1960 to manage
large amount of data for complex manufacturing projects such as
the Apollo rocket that landed on the moon in 1969.
Its basic logical structure is represented by an upside-down tree
The hierarchical structure contains levels or segments.
The hierarchical model depicts a set of one-tomany relational ship
between a parents and its children segments
DBMS tree like structure
1
6
Data Models and Types of Data Models
one parent may have multiple child but
the child will have only parent
Hierarchical Model
The hierarchical model was the first database model developed to
overcome the limitations of the traditional file system
Deletion of parent results in deletion of child records
The hierarchical models was developed in the 1960 to manage
large amount of data for complex manufacturing projects such as
the Apollo rocket that landed on the moon in 1969.
Its basic logical structure is represented by an upside-down tree
The hierarchical structure contains levels or segments.
The hierarchical model depicts a set of one-tomany relational ship
between a parents and its children segments
DBMS 1
7
Basic Concepts – Data , information, database and DBMS
Disadvantages of 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
• this model was developed to overcome the problems of hierarchical
model
DEPARTMENT No Name ID Name Course STUDENTS
COURSES No Name Unit ID Name PROFESSORS
Network model
DBMS 1
9
Data Models and Types of Data Models
Network model
Graph structure
Many-to-many relationships between linked records,
Some data might have multiple parents
Allow more connation between nodes
ex. A employee work for two department is not possible in
hierarchical mode, but here it is possible
The network model is a database model conveyed as a flexible
way of representing objects and their relationships
DBMS 2
0
Data Models and Types of Data Models
Advantages of network model
Simple design
Ability to handle many relationship
Easy to access
Data integrity ( current data, specify , fixed )
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 in DBMS
• In relational model, the data and relationships are represented by
collection of inter-related tables. Each table is a group of column and
rows, where column represents attribute of an entity and rows
represents records.
Relational model
DBMS 2
2
Data Models and Types of Data Models
Relational model in DBMS
• A relational database is a collection of one or more relations
where each relation is a table with rows and columns
Attribute
Title Year Length
Star Wars 1977 124
Table = relation.
Column headers = attributes Might Ducks 1991 104
Wayne’s World 1992 95
Title Year Length
Star Wars 1977 124
Table = relation. Might 1991 104
Rows = tuple Tuple Ducks
Wayne’s 1992 95
World
Relational model
DBMS 2
3
Data Models and Types of Data Models
Relational model in DBMS
First proposed by Dr. E.F Codd of IBM Research in 1970
Implemented through Relational DBMS (RDBMS)
Represent database as a collection of relation
Informally, each relation look like a table of values
Represent database as a collections of relations
Relation database matches data by using common
characteristics found within the data set
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
Entity Relationship Model
• An entity relationship model, also called an entity-relationship (ER)
diagram, is a graphical representation of entities and their relationships
to each other, typically used in computing in regard to the organization
of data within databases or information systems. An entity is a piece of
data-an object or concept about which data is stored.
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
Attributes – common properties of the entities in a entity sets
e.g. students and people have names and addresses
Or – Each entity has certain characteristics known as attributes.
Relationship – specify the relations among entities from two or more
entity sets
Person Entity Type
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
customer has account
cust-street
cust-city balance
DBMS 2
7
Data Models and Types of Data Models
ER Model Diagram , (Mapping)
1-to-1 1-to Many Many-to-1 Many-to-Many
One to One(1:1) Relationship: and EMPLOYEE mangers one STORE;
each STORE is managed by one EMPLOYEE
One to many (1:M) relationship: A PAINTER can paint many PAINTINGs;
each Painting is painted by one PAINTER
Many to Many(M:N) Relationship: and EMPLOYEE can learn many SKILLs;
each SKILL can be learned by many EMPLYEEs.
DBMS 2
8
Data Models and Types of Data Models
Object Oriented Model
• Data Stored in the form of objects, the structure which are called
“Classes” that display data within it.
• Defines database as a collection of objects that contains both data
members values and operations that are allowed on the data.
• Inter-relationship and constraints are implemented through objects and
links.
• The DBMS developed using this mode is called OODBMS
• Combine the capabilities of object oriented programming language
• Evolved to handle more complex applications such as database for
scientific experiments, geographic information system, CAD (computer
Aided Design)
Object Oriented model
DBMS 2
9
Data Models and Types of Data Models
Object Oriented Model
• In a below diagram customer and account are considered as a object
Object Oriented model
DBMS 3
0
DDL, DML , DCL
DDL - Data Definition Language
o. Used by DB designers to define schema
o. DDL compile converts DDL statements and generate a set
of tables which are stored in.
o. Data dictionary contains metadata
o. e.g - SQL, ORCALE
DML - Data Manipulation Language
o. For accessing and manipulation the data
o. DML also known as query language
o. Procedural :- user specifies what data is required and how
to get those data.
DBMS 3
1
Basic Concepts – Data , information, database and DBMS
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