Unformatted text preview:

Information Systems Analysis and Design csc340 XV The Entity Relationship Model The Entity Relationship Model ER schemata are comparable to class diagrams The Entity Relationship Model 1 Information Systems Analysis and Design csc340 The Entity Relationship ER model is a conceptual data model capable of describing the data requirements for a new information system in a direct and easy to understand graphical notation Data requirements are described in terms of a conceptual or ER schema schema The Entity Relationship Model Entities Relationships and Attributes Cardinalities Identifiers and Generalization Documentation of E R Diagrams and Business Rules 2002 John Mylopoulos Information Systems Analysis and Design csc340 2002 John Mylopoulos The Entity Relationship Model 2 Information Systems Analysis and Design csc340 Entities These represent classes of objects facts things people that ha ve properties in common and an autonomous existence City Department Employee Purchase and Sale are examples of entities for a commercial organization An instance of an entity is an object in the class represented b y the entity Stockholm Helsinki are examples of instances of the entit y City and the emplo yees Peterson and Johanson are examples of instances of the Employee entity The E R model is very different from the relational model in which it is not possible to represent an object without knowing its properties an employee is represented b y a tuple containing the name surname age and other attributes The Constructs of the E R Model AND XOR 2002 John Mylopoulos The Entity Relationship Model 3 Information Systems Analysis and Design csc340 2002 John Mylopoulos The Entity Relationship Model 4 Information Systems Analysis and Design csc340 Relationships Examples of Entities The y represent logical links between two or more entities Residence is an example of a relationship that can exist between the entities City and Employee Exam is an example of a relationship that can exist between the entities Student and Course An instance of a relationship is an n tuple made up of instances of entities one for each of the entities involved The pair Johanssen Stockholm or the pair Peterson Oslo are examples of instances in the relationship Residence 2002 John Mylopoulos The Entity Relationship Model 5 2002 John Mylopoulos The Entity Relationship Model 6 Information Systems Analysis and Design csc340 Information Systems Analysis and Design csc340 Example of Instances for Exam Examples of Relationships Exam 2002 John Mylopoulos The Entity Relationship Model 7 Information Systems Analysis and Design csc340 2002 John Mylopoulos Information Systems Analysis and Design What Does An E R Diagram Really Really Mean Mean Course Course Meets Meets Room Room Course and Room are entities Their instances describe particular courses e g CSC340S and particular rooms e g WB116 Meets is a relationship Its instances describe particular meetings Each meeting has exactly one associated course and room Course Course instances instances 2002 John Mylopoulos Meets instances Meets instances Room Room instances instances The Entity Relationship Model 9 Information Systems Analysis and Design csc340 The Entity Relationship Model 8 csc340 Recursive Relationships Recursive relationships are also possible that is relationships between an entity and itself Note in the second example that the relationship is not symmetric In this case it is necessary to indicate the two roles that the entity involved pla ys in the relationship 2002 John Mylopoulos The Entity Relationship Model 10 Information Systems Analysis and Design Ternary Relationships csc340 AND XOR for Relationships Contains Order Order XOR Requests Requests FilledBy Order Order The Entity Relationship Model 11 2002 John Mylopoulos Service Service Shipment Shipment AND Generates Generates 2002 John Mylopoulos Part Part Invoice Invoice Orders either order order aa part or request a service but not both both For any given given order whenever there whenever there is at least least one one invoice there there is is also at least least one one shipment shipment and vice vice versa versa The Entity Relationship Model 12 Information Systems Analysis and Design Shipment Shipment Order Order FilledBy FilledBy Invoice Invoice Order Order Generates Generates Attributes Service Service Contains Contains Part Part Requests Requests 2002 John Mylopoulos csc340 These describe the elementary properties of entities or relationships For example Surname Salary and Age are possible attributes of the Employee entity while Date and Mark are possible attributes for the relationship Exam between Student and Course An attribute associates with each instance of an entit y or relationship a value belonging to a set known as the domain of the attribute The domain contains the admissible values for the attribute XOR Requests Requests Generates Generates Invoice Invoice Information Systems Analysis and Design Part Part Contains FilledBy AND Shipment Shipment csc340 Service Service The Entity Relationship Model 13 Information Systems Analysis and Design csc340 2002 John Mylopoulos The Entity Relationship Model 14 Information Systems Analysis and Design Attribute Examples csc340 Composite Attributes It is sometimes convenient to group attributes of the same entity or relationship that have closely connected meanings or uses Such groupings are called composite attributes 2002 John Mylopoulos The Entity Relationship Model 15 Information Systems Analysis and Design csc340 2002 John Mylopoulos The Entity Relationship Model 16 Information Systems Analysis and Design csc340 Cardinalities Schema with Attributes These are specified for each entity participating in a relationship and describe the maximum and minimum number of relationship occurrences in which an entit y occurrence can participate Cardinalities state how many times can an entity instance participate in instances of a given relationship 2002 John Mylopoulos The Entity Relationship Model 17 2002 John Mylopoulos The Entity Relationship Model 18 Information Systems Analysis and Design csc340 Information Systems Analysis and Design Cardinalities cont d csc340 Cardinality Examples In principle a cardinality is any pair of non negative integers n m such that n m or a pair of the form n N where N means any number If minimum cardinality is 0 we sa y that entity participation in a relationship is optional If minimum cardinality is 1 we say that entity


View Full Document

Toronto CSC 340 - The Entity-Relationship Model

Documents in this Course
Scoping

Scoping

10 pages

Load more
Loading Unlocking...
Login

Join to view The Entity-Relationship Model and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The Entity-Relationship Model and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?