0% found this document useful (0 votes)
11 views33 pages

CT042-3-1-IDB-Lecture 6

This document covers the Entity Relationship Model (ER Model) as part of a database introduction course. It outlines the components of the ER model, including entities, attributes, and relationships, and discusses key concepts such as connectivity, cardinality, and types of attributes. The learning outcomes emphasize the ability to explain ER components and their impact on database design and implementation.

Uploaded by

Evan Hariadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views33 pages

CT042-3-1-IDB-Lecture 6

This document covers the Entity Relationship Model (ER Model) as part of a database introduction course. It outlines the components of the ER model, including entities, attributes, and relationships, and discusses key concepts such as connectivity, cardinality, and types of attributes. The learning outcomes emphasize the ability to explain ER components and their impact on database design and implementation.

Uploaded by

Evan Hariadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Introduction to Databases

CT042-3-1-IDB

Lecture 6: Entity Relationship Model


(Part 1)
Topic & Structure of The
Lesson

• Components of ER model
• Types of attributes
• Connectivity and Cardinality

Module Code & Module Title Slide Title SLIDE 2


Learning
Outcomes

• At the end of this topic, You should be able to


– Explain the main characteristics of entity relationship components
– Explain how relationships between entities are defined and refined and how those
relationships are incorporated into the database design process
– Describe how ERD components affect database design and implementation

Module Code & Module Title Slide Title SLIDE 3


Key Terms You Must Be Able To Use

• If you have mastered this topic, you should be able to use the following
terms correctly in your assignments and exams:
– Weak Entity
– Derive Attribute
– Domain
– Single value & Multi value attribute
– Composite primary key

Module Code & Module Title Slide Title SLIDE 4


In this chapter, you will learn:

• The main characteristics of entity relationship components


• How relationships between entities are defined and refined and how
those relationships are incorporated into the database design process
• How ERD components affect database design and implementation

Module Code & Module Title Slide Title SLIDE 5


The Entity Relationship (ER) Model

• ER model forms the basis of an ER diagram


• ERD represents conceptual database as viewed by end user
• ERDs depict database’s main components:
– Entities
– Attributes
– Relationships

Module Code & Module Title Slide Title SLIDE 6


Entities

• Refers to entity set and not to single entity


occurrence
• Corresponds to table and not to row in
relational environment
• In both Chen and Crow’s Foot models,
entity is represented by rectangle
containing entity’s name
• Entity name, a noun, is usually written in
capital letters

Module Code & Module Title Slide Title SLIDE 7


Attributes

• Characteristics of entities
• In Chen model, attributes are represented by ovals and are
connected to entity rectangle with a line
• Each oval contains the name of attribute it represents
• In Crow’s Foot model, attributes are written in attribute box below
entity rectangle

Module Code & Module Title Slide Title SLIDE 8


Attributes (continued)

Module Code & Module Title Slide Title SLIDE 9


Domains

• Attributes have domain


– Domain is attribute’s set of possible values
• Attributes may share a domain

Module Code & Module Title Slide Title SLIDE 10


Identifiers (Primary Keys)

• Underlined in the ERD

Module Code & Module Title Slide Title SLIDE 11


Composite Primary Keys

• Primary keys ideally composed of only single attribute


• Possible to use a composite key
– Primary key composed of more than one attribute

Module Code & Module Title Slide Title SLIDE 12


Composite Primary Keys
(continued)

Module Code & Module Title Slide Title SLIDE 13


Composite and Simple Attributes

• Composite attribute can be subdivided


• Simple attribute cannot be subdivided

Module Code & Module Title Slide Title SLIDE 14


Single-Valued Attributes

• Single-value attribute can have only a single value

Module Code & Module Title Slide Title SLIDE 15


Multivalued Attributes

• Multivalued attributes can have many values

Module Code & Module Title Slide Title SLIDE 16


Multivalued Attributes (continued)

Module Code & Module Title Slide Title SLIDE 17


Resolving Multivalued Attribute Problems
(continued)

Module Code & Module Title Slide Title SLIDE 18


Resolving Multivalued Attribute Problems
(continued)

Module Code & Module Title Slide Title SLIDE 19


Resolving Multivalued Attribute Problems
(continued)

Module Code & Module Title Slide Title SLIDE 20


Derived Attributes

• Attribute whose value may be calculated (derived) from other


attributes
• Need not be physically stored within database
• Can be derived by using an algorithm

Module Code & Module Title Slide Title SLIDE 21


Derived Attributes (continued)

Module Code & Module Title Slide Title SLIDE 22


Derived Attributes (continued)

Module Code & Module Title Slide Title SLIDE 23


Relationships

• Association between entities


• Participants are entities that participate in a relationship
• Relationships between entities always operate in both directions
• Relationship can be classified as 1:M
• Relationship classification is difficult to establish if know only one side of
the relationship

Module Code & Module Title Slide Title SLIDE 24


Connectivity and Cardinality

• Connectivity
– Used to describe the relationship classification
• Cardinality
– Expresses minimum and maximum number of entity occurrences associated with
one occurrence of related entity
• Established by very concise statements known as business rules

Module Code & Module Title Slide Title SLIDE 25


Connectivity and Cardinality
(continued)

Module Code & Module Title Slide Title SLIDE 26


Weak Entities

• Weak entity meets two conditions


– Existence-dependent
• Cannot exist without entity with which it has a relationship
– Has primary key that is partially or totally derived from parent entity
in relationship
• Database designer usually determines whether an entity can be
described as weak based on business rules

Module Code & Module Title Slide Title SLIDE 27


Weak Entities (continued)

Module Code & Module Title Slide Title SLIDE 28


Weak Entities (continued)

Module Code & Module Title Slide Title SLIDE 29


Quick Review Question

• Provide 1 example of derived attribute


• Provide 1 example of weak entity
• Provide 1 example of single-value attribute
• Provide 1 example of multi-value attribute

Module Code & Module Title Slide Title SLIDE 30


Summary of Main Teaching Points

• Derived attribute
• Weak entity
• Simple attribute
• Composite attribute
• Single-value attribute
• Multi-value attribute

Module Code & Module Title Slide Title SLIDE 31


Question and Answer
Session

Q&A

Module Code & Module Title Slide Title SLIDE 32


What we will cover next

• ERD notation
• Relationship Participation
• Relationship Degree
• Composite Entities

Module Code & Module Title Slide Title SLIDE 33

You might also like