PARUL INSTITUTE OF ENGINEERING &TECHNOLOGY
FACULTY OF ENGINEERING & TECHNOLOGY
PARUL UNIVERSITY
Database Management System
Unit 3 : Relational Data Model
Computer Science & Engineering
Prepared by : Nilesh Khodifad
Outline
• Data Models • Relationships,
• Hierarchical Model • Mapping Cardinalities
• Network Model • Participation Constraints
• Relational Model • Weak Entity Sets,
• Object Oriented Model. • Specialization
• E-R Diagram • Generalization
• Introduction to E-R • Aggregation.
Diagram
• Entities, Attributes & its
types,
What is Database Models?
A database model is a type of data model that defines the
logical structure of a database.
It determine how data can be stored, accessed and
updated in a database management system.
The most popular example of a database model is the
relational model, which uses a table-based format.
Type of Database Models
Hierarchical Model
Network Model
Entity-relationship Model
Relational Model
Object-oriented database Model
Hierarchical Model
• The hierarchical model organizes data into a tree-like structure, where
each record has a single parent or root.
• The hierarchy starts from the Root data, and expands like a tree, adding
child nodes to the parent nodes.
• In hierarchical model, data is organized into tree-like structure with one-
to-many relationship between two different types of data, for example,
one department can have many professors and many students.
Network Model
This is an extension of the hierarchical model, allowing many-to-many
relationships in a tree-like structure that allows multiple parents.
Entity-relationship Model
• In this database model, relationships are created by
. dividing object of interest into entity and its
characteristics into attributes.
Relational Model
In this model, data is organized in two-dimensional tables
and the relationship is maintained by storing a common
attribute.
Object-oriented database Model
• This data model is another method of representing real
world objects.
• It considers each object in the world as objects and
isolates it from each other.
• It groups its related functionalities together and allows
inheriting its functionality to other related sub-groups.
E-R Diagram
Entity
Entity Set
Attributes
Relationship
E-R Diagram Example:
.
E-R Diagram Example:
.
Limitation of E-R Diagram
.
Symbol of E-R Diagram
.
Symbol of E-R Diagram
.
Types of Attribute
Types of Attribute
.
Types of Attribute
Entity with Attributes:
Descriptive Attribute
Role:
Mapping Cardinality
One to One Relationship
One to Many Relationship
Many to One Relationship
Many to Many Relationship
Participation Constraints
Total Participation V/S Partial Participation
.
Weak Entity Set
.
Weak Entity Set
• in a DBMS, a weak entity set does not contain a primary key.
.
• For example, An entity of smartphones with its attributes, phone's name,
phone's colour, and phone's RAM.
• Below is the representation of a weak entity set in tabular form:
Weak Entity Set
Example of Entity Relationship Diagram representation of the above weak entity set:
Weak Entity Set
Generalization
•Generalization is like a bottom-up approach in which two or
more entities of lower level combine to form a higher level
entity if they have some attributes in common.
•In generalization, an entity of a higher level can also
combine with the entities of the lower level to form a
further higher level entity.
•In generalization, entities are combined to form a more
generalized entity, i.e., subclasses are combined to make a
Generalization
For example, Faculty and Student entities can be generalized and
create a higher level entity Person.
Specialization
•Specialization is a top-down approach, and it is opposite to
Generalization.
•In specialization, one higher level entity can be broken
down into two lower level entities.
•Specialization is used to identify the subset of an entity set
that shares some distinguishing characteristics.
Specialization
•For example: In an Employee management system,
EMPLOYEE entity can be specialized as TESTER or DEVELOPER
based on what role they play in the company.
Superclass and Subclass
.
Generalization VS Specialization
.
Generalization VS Spec
Generalization VS Specialization
Example
.
Constraints :
Disjoint Constraint
Disjoint Constraint
Non-Disjoint Constraint
Participation Constraint
Total Constraint
Partial Participation
Aggregation
• In aggregation, the relation between two entities is
treated as a single entity.
• In aggregation, relationship with its corresponding entities
is aggregated into a higher level entity.
• For example: Center entity offers the Course entity act as
a single entity in the relationship which is in a
relationship with another entity visitor.
• In the real world, if a visitor visits a coaching center then
he will never enquiry about the Course only or just about
the Center instead he will ask the enquiry about both.
Aggregation
Thank You!!!
www.paruluniversity.ac.in