Professional Documents
Culture Documents
Chap03 - Modeling Data in The Organization
Chap03 - Modeling Data in The Organization
Objectives
Definition of terms
Importance of data modeling
Write good names and definitions for entities,
relationships, and attributes
Distinguish unary, binary, and ternary relationships
Model different types of attributes, entities,
relationships, and cardinalities
Draw E-R diagrams for common business situations
Convert many-to-many relationships to associative
entities
Model time-dependent data using time stamps
Chapter 3
Business Rules
Chapter 3
Chapter 3
Chapter 3
Data Definitions
Chapter 3
Entities:
Relationships:
Chapter 3
Chapter 3
Entity
symbols
Attribute
symbols
A special entity
that is also a
relationship
Relationship
symbols
Relationship
degrees
specify number
of entity types
involved
Chapter 3
Relationship
cardinalities
specify how
many of each
entity type is
allowed
2007 by Prentice Hall
SHOULD BE:
Chapter 3
10
System
user
Inappropriate
entities
System
output
Appropriate
entities
Chapter 3
11
Attributes
Attributeproperty or characteristic of
an entity or relationahip type
Classifications of attributes:
Chapter 3
12
Identifiers (Keys)
Chapter 3
13
Characteristics of Identifiers
Chapter 3
14
Multivalued
an employee can have
more than one skill
Chapter 3
Derived
from date
employed
and current
date
15
Chapter 3
16
This attribute
that is both
multivalued
and
composite
Chapter 3
17
More on Relationships
Chapter 3
18
b)
Relationship
instances
Chapter 3
19
Degree of Relationships
Degree
of a relationship is
the number of entity types
that participate in it
Unary
Relationship
Binary Relationship
Ternary Relationship
Chapter 3
20
One entity
related to
another of
the same
entity type
Chapter 3
Entities of
two different
types related
to each other
Entities of three
different types
related to each
other
21
Cardinality of Relationships
One-to-One
One-to-Many
Many-to-Many
Chapter 3
22
Cardinality Constraints
Maximum Cardinality
Chapter 3
23
Chapter 3
24
Chapter 3
25
26
a) Mandatory cardinalities
A patient history is
recorded for one and
only one patient
Chapter 3
27
A project must be
assigned to at least
one employee, and
may be assigned to
many
Chapter 3
An employee can be
assigned to any number
of projects, or may not be
assigned to any at all
28
a) Optional cardinalities
A person is is
married to at
most one other
person, or may
not be married
at all
Chapter 3
29
Chapter 3
30
Here, min
cardinality
constraint is 2
Chapter 3
31
simple
composite
Chapter 3
32
Strong entities
Weak entity
Identifying relationship
Chapter 3
33
Identifying relationship
Strong entity
Chapter 3
Weak entity
34
Associative Entities
entityhas attributes
An
Chapter 3
35
36
37
38
Chapter 3
39
Microsoft Visio
Notation for Pine
Valley Furniture
E-R diagram
Different modeling
software tools may
have different
notation for the same
constructs
Chapter 3
40