Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Summary Chapter 4n5 - ERD

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

ENTITY RELATIONSHIP (ER) MODEL

(SUMMARY)
ICT501 – DATABASE MANAGEMENT SYSTEMS

Pn Marhainis Jamaludin
Faculty Of Computer And Mathematical Sciences
UiTM Kelantan
Basic Building Blocks of Entity Relationship
Diagram
• Entity – entity set
• Attribute – characteristics of an entity
• Relationship – association between entities

Entity

STUDENT
CAR
PK stuID
PK regNo
owns
Attribute stuName
model Attribute
stuProg
cgpa color
Relationship FK1 stuID
Eg: age
Simple
Attribute

Single-
valued
attribute Eg: icno

Types of
Attribute Create new Relationships
Multi- attributes within Types
Composite the same entity
valued
Attribute
attribute
Create a new
Derived Eg: qualification entity and relate
Eg: icno
Attribute the entity to the
existing entity
with 1:M Cardinality
Eg: age relationship
Calculated from Birth of date Connectivity

Example :
Entity Type and Relationship Strength

• Strong (identifying) relationship

Weak Entity • Existence dependent


• PK is is partially or totally derived from parent entity in the
relationship

• Weak (identifying) relationship


Strong Entity • Existence independent
• It has its own PK

*** Database designer determines whether an entity is weak or not based on business rules
Relationship Participation

Mandatory
Optional

Example 1: Optional participation Example 2: Mandatory participation

Each course may or may not generate a class. Each course may generate at least one class.
Unary
(Recursive)
Unary/Recursive

Examples
Relationship Binary
Degree

Ternary Binary

Ternary
Associative Entities

• Also known as composite or bridge entities


• Used to represent an M:N relationship between two or more
entities
• Is in a 1:M relationship with the parent entities
• Composed of the primary key attributes of each parent entity
• May also contain additional attributes that play no role in
connective process
Database Design Challenges:
Conflicting Goals
Database design must conform to design standards

Need for high processing speed may limit the number and
complexity of logically desirable relationships

Need for maximum information generation may lead to loss of


clean design structures and high transaction speed
EXTENDED ENTITY RELATIONSHIP MODEL
(EERM)
Entity Supertypes and Subtypes

• Result of adding more semantic constructs to the original entity


relationship (ER) model
• EER diagram (EERD): Uses the EER model

Contains common characteristics

1:1 relationship between supertype and


subtype(s)

Contains unique/specific
characteristics of subtypes
Specialization and Generalization Hierarchy

Specialization Generalization
• Top-down process • Bottom-up process
• Identifies lower-level, more • Identifies a higher-level, more
specific entity subtypes from generic entity supertype from
a higher-level entity lower-level entity subtypes
supertype • Based on grouping common
• Based on grouping unique characteristics and
characteristics and relationships of the subtypes
relationships of the subtypes
Subtype Discriminator
• Is the relationship between subtypes

Contain a unique Contain nonunique


subset of the subsets of the
supertype entity supertype entity set
set
Completeness Constraint
• Specifies whether each supertype occurrence must also be a member of at least one subtype
EXAMPLE
EXERCISE
Given the information below :
“E-cha Enterprise requires an information system that able to manage and store their various type
of lights, fans and air conditioner detail information such as product description, brand, model, serial
number, date acquired, purchase price, as well as warranty expired date. The products are supplied by a
supplier. The supplier information such as supplier's name, address and company number must be stored in
the database. Each product has an employee that handles it and an employee can handle many products
or may not manage at all. The requirement for the system includes the management of employee
information such as name, position, date of birth, address and telephone number. The product such as air
conditioner has many maintenance records. Maintenance information involves the maintenance's
description and maintenance date. Product maintenance is done by the company technician. A technician
is an employee and able to make many maintenance works. The qualification of technician must be stored
in the system.”
i. Draw an entity relationship diagram (ERD) using crow’s foot model that shows all entities, attributes,
relationships, cardinality, primary and foreign keys.
ii. From the above information, provide an example of :
• Simple attribute
• Multivalued attribute
• Derived attribute
• Compound or composite attribute
iii. Give TWO(2) examples of report that can be produced from this information system
References

• Peter Rob and Carlos Coronel, Database Systems: Design,


Implementation and Management, International Thomson Publishing
(ITP), tenth Edition, 2009.
• UiTM PastYear Exam Question

You might also like