110 likes | 191 Views
Explore various patterns in data models including instance hierarchy, subtype relationships, and reflexive associations with examples such as Company Division Department, Student Phone Address, and more.
E N D
CSCI 242 SOME Patterns in Data Models
LEGEND OPTIONAL ZERO OR MORE ONE MANY ONE ONE OR MORE ONE MANY
TYPE Bus Bus Type
Aggregation/containment “Many” cardinality always on the same side. This pattern represents an instance hierarchy. Company Division Department Also: parts explosion, geographic hierarchy
intersection 3 entities, two 1-M relationships. “Many” cardinality on the inside. Capability Skill Employee Also: students and teachers, students and courses, parts and suppliers
Differing aspects of same 3 entities, two 1-M relationships. “Many” cardinality on the outside. Student Phone Address Also: employees and dependents, employees and college degrees, owners and cars
Subordinate or subtype “be” labels indicate that entities are two different relationships of the same concept. Full-Time Employee Part-Time Employee Employee be be be be
Subordinates across Subordinate descriptor always on the same side of the relationship, for an n-level inheritance hierarchy. Full-Time Employee University Person Employee be be be be
Reflexive association manages Employee is managed by
inventory Classes of inventory: 1. Items tracked individually tend to have individual identifiers tend to have differences between individuals 2 Items tracked in aggregate tend to not have identifiers only quantities are tracked Examples: 1. people, cars, houses, taxpayers, expensive art works 2 pencils, coal, gasoline, water, paint