1 / 23

Chapter 6

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.

wind
Télécharger la présentation

Chapter 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 6 Entity Relationship Model

  2. 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

  3. Example of an Attribute

  4. Type of Attribute • Simple Attributes vs. Composite Attributes

  5. Solitary Attribute vs. Multiple Value Attribute

  6. Derived Attribute

  7. Attribute Domain & Key • Set of values for an attribute • Character • Numeric • Date • Attributes with one key/ two keys

  8. Relationship • Link between entities. • Types of relationship: • Unary • Binary • Ternary

  9. Unary

  10. Binary

  11. Ternary

  12. Cardinality • One to one relationship (1:1) • One to many relationship (1:M) • Many to many relationship (M:N)

  13. 1:1 Relationship

  14. 1:M Relationship

  15. M:N Relationship

  16. Relationship Participation • Compulsory • Optional

  17. Guidelines and Steps in ER Model • No system environment insertion.

  18. Wrap-up on ERD • Determine 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.

  19. Tutorial 1 Prepare 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.

  20. -Thank You-

More Related