er
er
er
Model
Lecture 2
INFS614
R1 R2 R3
1) Requirements
4) Physical
Analysis
Design
requirement
4 Stages
requirement
requirement
requirement
requirement
requirement Queries ->
requirement
requirement
requirement
requirement
requirement
requirement
R1 R2 R3
requirement
requirement
requirement
Indices, Replication,...
❖ An aside
– data structures + integrity constraints = a data
model (T/F)?
name
ssn lot
Employees
Diagram rule:
❖ Arity
– relationships do not have to be binary, can be ternary, or ....
– An n-ary relationship set R relates n entity sets E1 ... En
– each relationship in R relates specific entities ea in E1,...,ez in
En
Diagram rule:
name
role indicators
ssn lot
Employees
supervisor subordinate
Reports_To since
3/3/96
11/3/98
123-22-366 A
11/3/98
534-55-928 B
633-90-9767 11/3/98
C
231-89-6598
7/30/95
7/30/95
Employees Departments
M Works_In N
since
since
name dname
ssn lot did budget
Works_In
since
INFS614, GMU, Lecture 2 33
Participation Constraints
3/3/96
123-22-366 23
11/3/98
534-55-928
37
633-90-9767
51
7/30/95
231-89-6598
name
ssn lot pname age
Hourly_Emps Contract_Emps
hourly_wages hours_worked
ISA
contractid
Hourly_Emps Contract_Emps
started_on since
dname
pid pbudget did budget
started_on since
dname
pid pbudget did budget
from Duration to
Policies
qty
Suppliers
❖ Major ER constructs:
– entities, relationships, and attributes
– key (cardinality) and participation constraints
– weak entities, ISA hierarchies, and aggregation
❖ Notes:
– Many variations on ER model.
– ER is subjective; normalization will address this later ...
– In big data scenarios, conceptual design may be not needed (due to
very few entities) and/or impossible (due to uncertain in
attributes)
INFS614, GMU, Lecture 2 57
Putting It All Together!
❖ You start with an English (or...) description of the
modeling problem
– either handed to you, or you extract it from interviews
❖ You attempt to capture all the features described
in an initial ER diagram
– you determine entities, attributes, relationships
❖ You (almost certainly will) refine it several times
– e.g., moving attributes to the right place, making sure
every constraint is correctly marked
– ask clarifying questions as needed
– test it out by thinking of example instances
– explicitly state in English what you couldn’t model in ER