Professional Documents
Culture Documents
2-Data Modeling-EER
2-Data Modeling-EER
2-Data Modeling-EER
1
Extended ER features
2
Specialization and Generalization
An Example:
Customers can have checking and savings accts
Checking ~ Savings (many of the same attributes)
Old Way:
3
Specialization and Generalization
An Example:
Customers can have checking and savings accts
Checking ~ Savings (many of the same attributes)
Isa
interest overdraft
subclasses
4
Specialization and
Generalization - Inheritance
5
Specialization and
Generalization – UMI Notation
In terms of an E-R diagram, specialization is depicted by a hollow arrow-
head pointing from the specialized entity to the other entity
person
ID
name
address
customer
employee
credit-rating
salary
6
Specialization and
Generalization -Chen Notation
7
Specialization
Attribute inheritance – Lower-level entity sets are said to inherit all the
attributes and relationships from the higher-level entity sets to which they are
linked.
8
Specialization vs. Generalization
9
Specialization
and Generalization, Cont.
10
Specialization and Generalization
Subclass Distinctions:
1. User-Defined vs. Condition-Defined
User: Membership in subclasses explicitly determined
(e.g., Person, Student, Teacher)
Condition: Membership predicate associated with
subclasses - e.g: given below
Person
Isa
11
Specialization and Generalization
Subclass Distinctions:
2. Overlapping vs. Disjoint
Overlapping: Entities can belong to >1 entity set
(e.g., Adult, Senior)
Disjoint: Entities belong to exactly 1 entity set
(e.g., Child)
Person
Isa
Disjoint
12
Specialization and Generalization
Subclass Distinctions:
3. Total vs. Partial Membership
Total: Every entity of superclass belongs to a subclass
Person
Isa
13
Specialization and Generalization
Subclass Distinctions:
3. Total vs. Partial Membership
Total: Every entity of superclass belongs to a subclass
Person
Isa
14
Aggregation
?
Loan_Officer
Employee
15
Aggregation - Binary
Loan_Officer
Employee
16
Aggregation
17
E-R Diagram for a Banking
Enterprise (Chen’s Notation)
18
E-R Diagram
for the Banking Enterprise
branch
account branch-name
account-branch
account-number Branch-city
balance assets
depositor loan-branch
customer loan
customer- name borrower loan-number
customer-street amount
customer-city
19
E-R Diagram
for a University
20
Lets Try an Example!
21
Lets Try an Example!
22
Thank You!
23