Professional Documents
Culture Documents
Review
• Entity: a thing that exists
Entity-Relationship (ER) Model – e.g. person, automobile, department, employee
• Entity Set: a group of similar entities
(Peter P.-S. Chen) – e.g. all persons, all automobiles, all employees
Employee
Constraints (cardinality)
N
1. Employees may be assigned to only 1 department at a time.
2. Employees may be assigned to several projects at once,
ENAME ADDRESS Assigned P#
To M
each with an associated %time.
Project
Constraints (participation)
3. Employees must be assigned to a department. %TIME PNAME
4. Employees need not be assigned to any projects.
Entity-Relationship Model Review 3 Entity-Relationship Model Review 4
1
Entity-Relationship Enhancements: Attributes Entity-Relationship Enhancements: Attributes
(1,1)
• Relationships
(0,1)
Employee Manages Department – Is_In(E#, D#) 1:N
– Min represents participation (0 partial, >0 total). – Assigned_To(E#, P#, %TIME) N:M
– Max represents cardinality.
Entity-Relationship Model Review 11 Entity-Relationship Model Review 12
2
As Relations: Replacing Employee and Enhanced-ER (EER) Model
Is_In with Employee’
• Entities • Subclasses & Superclasses
– Department(D#, DNAME) – Specialization & Generalization
– Employee’(E#, ENAME, ADDRESS, D#) – Type Inheritance
– Project(P#, PNAME)
• Categories
• Relationships
– Assigned_To(E#, P#, %TIME) N:M
– [Is_In(E#, D#)]
Entity-Relationship Model Review 13 Entity-Relationship Model Review 14
Program
Number* Room
Person o
Grad Student Capacity
MeetingLocation MeetsAt
Name
Place
Park
Student d