Lecture 12: Entity Relationship Modelling
[Pages:23]University of Toronto
Department of Computer Science
Lecture 12: Entity Relationship Modelling
The Entity-Relationship Model
Entities Relationships Attributes
Constraining the instances
Cardinalities Identifiers Generalization
? 2004-5 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license.
1
University of Toronto
Department of Computer Science
The Entity Relationship Model
Entity-Relationship Schema
Describes data requirements for a new information system Direct, easy-to-understand graphical notation Translates readily to relational schema for database design
But more abstract than relational schema E.g. can represent an entity without knowing its properties
comparable to UML class diagrams
Entities:
classes of objects with properties in common and an autonomous existence
E.g. City, Department, Employee, Purchase and Sale
An instance of an entity is an object in the class represented by the entity
E.g. Stockholm, Helsinki, are examples of instances of the entity City
Relationships:
logical links between two or more entities.
E.g. Residence is a relationship that can exist between the City and Employee
An instance of a relationship is an n-tuple of instances of entities
E.g. the pair (Johanssen,Stockholm), is an instance in the relationship Residence.
? 2004-5 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license.
2
University of Toronto
Department of Computer Science
Examples
Adapted from chapter 5 of Atzeni et al, "Database Systems" McGraw Hill, 1999
? 2004-5 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license.
3
University of Toronto
Department of Computer Science
Example Instances for Exam
Adapted from chapter 5 of Atzeni et al, "Database Systems" McGraw Hill, 1999
Exam
? 2004-5 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license.
4
University of Toronto
Department of Computer Science
What Does An ER Diagram Really Mean?
Adapted from chapter 5 of Atzeni et al, "Database Systems" McGraw Hill, 1999
Course
Meets
Room
Course and Room are entities.
Their instances are particular courses (eg CSC340F) and rooms (eg MS2172)
Meets is a relationship.
Its instances describe particular meetings. Each meeting has exactly one associated course and room
Course instances Meets instances
Room instances
? 2004-5 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license.
5
University of Toronto
Department of Computer Science
Recursive Relationships
Adapted from chapter 5 of Atzeni et al, "Database Systems" McGraw Hill, 1999
An entity can have relationships with itself...
If the relationship is not symmetric...
...need to indicate the two roles that the entity plays in the relationship.
? 2004-5 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license.
6
University of Toronto
Department of Computer Science
Ternary Relationships
Adapted from chapter 5 of Atzeni et al, "Database Systems" McGraw Hill, 1999
? 2004-5 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license.
7
University of Toronto
Department of Computer Science
AND/XOR Relationships
"Each Order either contains a part or requests a service, but not
both"
"For any given order, whenever there is at
least one invoice there is also at least
one shipment and vice versa"
? 2004-5 Steve Easterbrook. This presentation is available free for non-commercial use with attribution under a creative commons license.
8
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- lecture 12 entity relationship modelling
- parent education activities
- directory of evidence based parenting programs why use
- bcps believes parent university will
- logic models and outcomes for early childhood programs
- family engagement partnering with families to improve
- epstein s six types of parent involvement
- piwi parents interacting with infants vanderbilt university
- epstein s six types of parent involvement what can you do
- parental involvement as a important factor for successful
Related searches
- marketing management pdf lecture notes
- strategic management lecture notes pdf
- strategic management lecture notes
- philosophy 101 lecture notes
- philosophy lecture notes
- philosophy of education lecture notes
- financial management lecture notes
- financial management lecture notes pdf
- business management lecture notes
- introduction to philosophy lecture notes
- business management lecture notes pdf
- introduction to management lecture notes