DOC PREVIEW
Toronto CSC 340 - The Entity-Relationship Model

This preview shows page 1-2-3-27-28-29 out of 29 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

The Entity-Relationship Model -- 1Information Systems Analysis and Design csc3402004 John MylopoulosXVI. The Entity-Relationship ModelThe Entity-Relationship ModelEntities, Relationships and AttributesCardinalities, Identifiers and GeneralizationDocumentation of E-R Diagrams and Business RulesThe Entity-Relationship Model -- 2Information Systems Analysis and Design csc3402004 John MylopoulosThe Entity Relationship Model The Entity-Relationship (ER) model is a conceptualdata model, capable of describing the data requirementsfor a new information system in a direct and easy tounderstand graphical notation. Data requirements are described in terms of aconceptual conceptual (or,(or, ER ER) ) schemaschema. ER schemata are comparable to class diagrams.The Entity-Relationship Model -- 3Information Systems Analysis and Design csc3402004 John MylopoulosThe Constructs ofthe E-R ModelAND/XORThe Entity-Relationship Model -- 4Information Systems Analysis and Design csc3402004 John MylopoulosEntities Represent classes of objects (facts, things, people,...) thathave 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 representedby the entity, e.g., Stockholm, Helsinki, are examples ofinstances of the entity City; Peterson and Johanson areexamples of instances of the Employee entity. [The E-R model is very different from the relational model inwhich it is not possible to represent an object withoutknowing its properties, e.g., an employee is represented bya tuple containing the name, surname, age, and otherattributes.]The Entity-Relationship Model -- 5Information Systems Analysis and Design csc3402004 John MylopoulosExamples of EntitiesThe Entity-Relationship Model -- 6Information Systems Analysis and Design csc3402004 John MylopoulosRelationships They represent associations between two or more entities.Residence is an example of a relationship that can existbetween the entities City and Employee; Exam is anexample of a relationship that can exist between theentities Student and Course. An instance of a relationship is an n-tuple made up ofinstances of entities, one for each of the entities involved. The pair (Johanssen,Stockholm), or the pair(Peterson,Oslo), are examples of instances of therelationship Residence.Note: The collection of instances of a relationship isby definition a set, not a bag; i.e., no duplicates!The Entity-Relationship Model -- 7Information Systems Analysis and Design csc3402004 John MylopoulosExamples of RelationshipsThe Entity-Relationship Model -- 8Information Systems Analysis and Design csc3402004 John MylopoulosExample of Instances for ExamExamNote: A student can’t take more than one exam for aparticular course!The Entity-Relationship Model -- 9Information Systems Analysis and Design csc3402004 John MylopoulosWhat Does A Diagram What Does A Diagram ReallyReally Mean? Mean?CourseCourse and RoomRoom are entities. Their instances describeparticular courses (e.g., CSC340S) and particular rooms (e.g.,WB116). MeetsMeets is a relationship. Its instances describe particularmeetings. Each meeting has exactly one associated course androomCourseCourseCourseMeetsMeetsRoomRoomRoomCourse instancesCourse instancesCourse instancesRoom instancesRoom instancesRoom instancesMeets instancesMeets instancesMeets instancesThe Entity-Relationship Model -- 10Information Systems Analysis and Design csc3402004 John MylopoulosRecursive Relationships Recursive relationshipsare also possible, that isrelationships between anentity and itself. Note in the secondexample that therelationship is notsymmetric. In this case itis necessary to indicatethe two roles that theentity involved plays in therelationship.The Entity-Relationship Model -- 11Information Systems Analysis and Design csc3402004 John MylopoulosTernary RelationshipsThe Entity-Relationship Model -- 12Information Systems Analysis and Design csc3402004 John MylopoulosAND/XOR for RelationshipsAND/XOR for RelationshipsOrderOrderOrderContainsContainsContainsPartPartPartRequestsRequestsRequestsServiceServiceServiceXORXOROrderOrderOrderFilledByFilledByFilledByShipmentShipmentShipmentGeneratesGeneratesGeneratesInvoiceInvoiceInvoiceANDAND““OrdersOrderseither order aeither order apart orpart orrequest arequest aservice, butservice, butnot bothnot both””““For any givenFor any givenorder,order,whenever therewhenever thereis at least oneis at least oneinvoice there isinvoice there isalso at least onealso at least oneshipmentshipmentand vice versaand vice versa””The Entity-Relationship Model -- 13Information Systems Analysis and Design csc3402004 John MylopoulosOrderOrderOrderContainsContainsContainsPartPartPartRequestsRequestsRequestsServiceServiceServiceXORXORXORFilledByFilledByFilledByGeneratesGeneratesGeneratesShipmentShipmentShipmentInvoiceInvoiceInvoiceANDANDANDShipmentShipmentShipmentInvoiceInvoiceInvoiceGeneratesGeneratesGeneratesFilledByFilledByFilledByOrderOrderOrderContainsContainsContainsRequestsRequestsRequestsServiceServiceServicePartPartPartThe Entity-Relationship Model -- 14Information Systems Analysis and Design csc3402004 John MylopoulosAttributes Describe elementary properties of entities or relationships. For example, Surname, Salary and Age are attributes ofEmployee, while Date and Mark are attributes ofrelationship Exam between Student and Course. An attribute associates with each instance of an entity (orrelationship) one or more values belonging to its domain. Attributes may be single-valued, or multi-valued.The Entity-Relationship Model -- 15Information Systems Analysis and Design csc3402004 John MylopoulosAttribute ExamplesThe Entity-Relationship Model -- 16Information Systems Analysis and Design


View Full Document

Toronto CSC 340 - The Entity-Relationship Model

Documents in this Course
Scoping

Scoping

10 pages

Load more
Download The Entity-Relationship Model
Our administrator received your request to download this document. We will send you the file to your email shortly.
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 2 2 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?