Modeling Data in The Organization (Data Analysis)
Modeling Data in The Organization (Data Analysis)
Modeling Data in The Organization (Data Analysis)
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
4
BUSINESS RULES
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
15
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
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
23
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
a) Unary relationships
b) Binary relationships
c) Ternary relationship
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
Different modeling
software tools may have
different notation for the
same constructs.