Title: Cost Management Systems
1E-R Diagram for a small manufacturer
2Basic E-R Notation
3E-R Model Constructs
- Entity - person, place, object, event, concept
- Entity Type versus Entity Instance
- Entity Type versus System Input, Output, or User
- Strong Vs. weak entity types
- Attributes
- Simple Vs. Composite Attributes
- Single-Valued Vs. Multi-valued Attribute
- Stored Vs. Derived Attributed
- Relationships
4Example of inappropriate entities
System user (Treasurer) and output (Expense
Report) shown as entities
5E-R Model Constructs
- Strong versus Weak Entity Type
- Identifying relationship.
- Weak entity identifier is its partial identifier
combined with that of its owner.
6Example of a Weak Entity
7A Composite Attribute
8Entity with a Multi-valued Attribute (Skill) and
Derived Attribute (Years_Employed)
9Identifiers or Keys
- Identifier or Key - An attribute (or combination
of attributes) that uniquely identifies
individual instances of an entity type. - Simple Key versus Composite Key
- Criteria for Selecting Identifier or Keys
- Will not change in value.
- Will not be null.
- No intelligent identifiers (containing e.g.
locations or people that might change) - Substitute new, simple keys for long, composite
keys.
10Relationships
- Degree of a Relationship - number of entity types
that participate in it. - Unary (or Recursive) Relationship
- Binary Relationship
- Ternary Relationship
- CAN have Attributes of Relationships
11Degree of Relationship
Binary
Course
Student
Vendor
Unary
Warehouse
Supplies
Ternary
Employee
Manages
Part
12Attribute on a Relationship
13An associative entity (CERTIFICATE)
14Supplies Relationship and Associate Entity Supply
Schedule
15Relationships
- Cardinality Constraints - the number of instances
of one entity that can or must be associated with
each instance of another entity. - Minimum Cardinality
- If zero, then optional.
- Maximum Cardinality
- Mandatory One - when min max both 1.
16Basic Relationship
17With Cardinality Constraint
18Mandatory Cardinalities
19One Optional, One Mandatory Cardinality
20Optional
Unary
Employee
Manages
21Cardinality constraints in a ternary relationship
22Simple Example of Time Stamping
23E-R Diagram Recognizing Product Reassignment
24Professors and Courses
25Summary
- ER model for conceptual data modeling is a
logical representation of data for an
organization - Basic constructs are entity types, relationship
related attributes. - An entity can be a person place location, object
event, or even a concept. - A relation type is meaningful association between
entities . - Degree of relationship is the number of entity
types involved in a relation. - A cardinality constraint is a constraint that
specifies the no. of instances of B associated
with each instances of A.