Professional Documents
Culture Documents
STUDENT
Social_Security_No
Name
Major
Entity Attribute
symbols symbols
A special entity
that is also a Relationship
relationship symbols
Relationship
degrees
specify number
of entity types Relationship
involved cardinalities
specify how
many of each
entity type is
allowed
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
8
WEAK ASSOCIATIVE
ENTITY
ENTITY ENTITY
MULTIVALUED DERIVED
ATTRIBUTE ATTRIBUTE
ATTRIBUTE
RELATIONSHIP INDENTIFYING
RELATIONSHIP
System System
user Inappropriate output
entities
Appropriate
entities
Required – must have a value for every Optional – may not have a value for
entity (or relationship) instance with every entity (or relationship) instance
which it is associated with which it is associated
The address is
broken into
component parts
Figure 2-8 Entity with multivalued attribute (Skill) and derived attribute
(Years Employed)
Multivalued Derived
an employee can Calculated
have more than one from date
skill employed
and current
date
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
21
IDENTIFIERS (KEYS)
Identifier (Key)–an attribute (or
combination of attributes) that uniquely
identifies individual instances of an entity
type
Simple versus Composite Identifier
Candidate Identifier–an attribute that
could be a key…satisfies the requirements
for being an identifier
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
22
CRITERIA FOR IDENTIFIERS
Choose Identifiers that
Will not change in value
The identifier
is boldfaced
and underlined
a) Relationship
type (Completes)
b) Relationship
instances
Entities of
One entity two different
related to types related Entities of three
another of to each other different types
the same
related to each
entity type
other
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
30
CARDINALITY OF RELATIONSHIPS
One-to-One
Each entity in the relationship will have exactly one
related entity
One-to-Many
An entity on one side of the relationship can have
many related entities, but an entity on the other
side will have a maximum of one related entity
Many-to-Many
Entities on both sides of the relationship can have
many related entities on the other side
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
31
Figure 2-12 Examples of relationships of different degrees
a) Unary relationships
b) Binary relationships
c) Ternary relationship
Maximum Cardinality
The maximum number
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
35
Figure 2-17 Examples of cardinality constraints
a) Mandatory cardinalities
c) Optional cardinalities
A person is
married to at most
one other person,
or may not be
married at all
simple
composite
The Assignment
Modeling time-dependent data has become associative entity shows
more important due to regulations such as the date range of a
HIPAA and Sarbanes-Oxley. product’s assignment to a
particular product line.
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
50
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Figure 2-22
Data model for Pine
Valley Furniture
Company in
Microsoft Visio
notation
Different modeling
software tools may have
different notation for the
same constructs.
* Customer ID * Order ID
Customer name Order Date
SUBMITS
M
Order ID
ORDER
Order date
59