Click here to load reader
Upload
wind
View
30
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Chapter 6. Entity Relationship Model. Basic Elements of E-R Model. Entity Object of the real world that stores data. Eg . Customer, State, Project, Supplier, etc. Attribute A description of an entity. Eg . Worker has name, worker number, department, address, etc. Relationship. - PowerPoint PPT Presentation
Citation preview
Chapter 4
Entity Relationship ModelChapter 61Basic Elements of E-R ModelEntity Object of the real world that stores data.Eg. Customer, State, Project, Supplier, etc.
AttributeA description of an entity.Eg. Worker has name, worker number, department, address, etc.RelationshipExample of an Attribute
Type of AttributeSimple Attributes vs. Composite Attributes
Solitary Attribute vs. Multiple Value Attribute
Derived Attribute
Attribute Domain & KeySet of values for an attributeCharacterNumericDateAttributes with one key/ two keysRelationshipLink between entities.Types of relationship:UnaryBinaryTernary
Unary
Binary
Ternary
CardinalityOne to one relationship (1:1)One to many relationship (1:M)Many to many relationship (M:N)
1:1 Relationship
1:M Relationship
M:N Relationship
Relationship ParticipationCompulsoryOptional
Guidelines and Steps in ER ModelNo system environment insertion.
Wrap-up on ERDDetermine entities, relationship.Determine attributes.Determine attributes related to relationship (if any).Choose the keys for the entities.Determine the domain for each attribute.Combine the diagrams.Check and refine.
Tutorial 1Prepare an ERD for the following case study:
A university database contains information about lecturers (identified by staff number) and courses (identified by course code). Lecturers teach courses; each of the following situations concerns the Teaches relationship set. For each situation, create an Entity Relationship (ER) diagram that describes it (assuming no further constraints hold).
1. Lecturers can teach the same course in several semesters, and each course offering must be recorded.2. Every lecturer must teach some course.3. Every lecturer teaches exactly one course (no more, no less).4. Every lecturer teaches exactly one course (no more, no less), and every course must be taught by some lecturer.5. Now suppose that certain courses can be taught by a team of lecturers jointly, but it is possible that no one lecturer in a team can teach the course. Model this situation, introducing additional entity sets and relationship sets if necessary.
-Thank You-