Presentation is loading. Please wait.

Presentation is loading. Please wait.

Entity-Relationship (E-R) Modeling

Similar presentations


Presentation on theme: "Entity-Relationship (E-R) Modeling"— Presentation transcript:

1 Entity-Relationship (E-R) Modeling
Also known as conceptual modeling or semantic modeling Four Basic Constructs: -Entity -Relationship -Attribute -Cardinality -(participation and connection) W.E. McCarthy 2002

2 ENTITY: Entities are named objects in the universe of discourse
Types of entities Thing (truck, building) Person (customer, employee) Event Instant duration (sale, purchase, cash receipt) Extended duration (month-long use of a truck, a course offering that starts on JAN 3 & ends on 16 FEB) Concept (category of customer, course) SYMBOL -- Rectangle Customer Course offering W.E. McCarthy 2002

3 2. RELATIONSHIP : Association between two (or more ?) entities
Examples: employee “assigned to” building customer “participates in” sale professor “teaches” course-offering SYMBOL -- Diamond participates in Customer Sale W.E. McCarthy 2002

4 3. ATTRIBUTE : Characteristics or elementary properties of entities or relationships. They are used for actual communication about the real world phenomena represented by entities or relationships Example attributes for the entity INVENTORY: stock#, color, price, cost, weight A primary key is a special attribute used to represent an instance of an entity or relationship in a database Must be unique and universal Can be a concatenated (combined key) “No representation without identification” For this class, we assume that relationships are identified by the keys of their participating entities SYMBOL – small connected circle (filled in for primary key) Inventory Stock# Color Price W.E. McCarthy 2002

5 4. Participation CARDINALITY (min, max):
4. Participation CARDINALITY (min, max): These show the correspondence of entities and relationships A rel B (min, max) Entity “A” participates in relationship “rel” at a maximum of - “1” time (single time only) - “n” times (many times) Entity “A” participates in relationship “rel” at a minimum of - “0” times (optional) - “1” time (mandatory) W.E. McCarthy 2002

6 4. Participation CARDINALITY (min, max): (other side of relationship)
B A rel (min, max) Entity “B” participates in relationship “rel” at a maximum of - “1” time (single time only) - “n” times (many times) Entity “B” participates in relationship “rel” at a minimum of - “0” times (optional) - “1” time (mandatory) W.E. McCarthy 2002

7 W.E. McCarthy 2002


Download ppt "Entity-Relationship (E-R) Modeling"

Similar presentations


Ads by Google