DB Lecture 4
DB Lecture 4
DB Lecture 4
Relationship
Name Description
Symbol
Relationships are associations between or
among entities.
Relationship
Cardinality Constraint-
Constraint- A rule that specifies the number of instances of one
entity that can (or must) be associated with each instance of another entity.
entity.
Minimum Cardinality
Cardinality-- The minimum number of instances of one entity that
may be associated with each instance of another entity
Maximum Cardinality-
Cardinality- The maximum number of instances of one entity that
may be associated with each instance of another entity
Cardinality Constraints (Cont.)
Basic Relationship
Mandatory cardinalities
Optional cardinalities
Cardinality Constraints (Cont.)-
Example of Relationships & their cardinalities (Cont.)
Each value of the attribute Price is time stamped with its effective
date.
date.
A time stamp is simply a time value,
value, such as date and time
time,, that is
value.
associated with a data value.
A time stamp may be associated with any data value that changes over
time when we need to maintain a history of those data values
values..
Time stamps may be recorded to indicate the time the value was
entered (transaction time)
time);; the time the value becomes valid or stops
being valid;
valid; or the time when critical actions were performed, such as
updates, corrections, or audits.
audits.
Modeling Multiple Relationships Between Entity Types
Naming & Defining Relationships