1 / 19

Chapter 7

Chapter 7. Enhanced Entity Relationship Model. EER Model. Contains additional concepts such as: weak entity, composite entity, super class and subclass entity, generalisation , specialisation and aggregation. WEAK ENTITY.

leala
Download Presentation

Chapter 7

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 7 Enhanced Entity Relationship Model

  2. EER Model • Contains additional concepts such as: • weak entity, • composite entity, • super class and subclass entity, • generalisation, • specialisation and • aggregation

  3. WEAK ENTITY • Weak entity has characteristics opposite to a strong entity. • The existence of a weak entity depends on the existence of other entities.

  4. COMPOSITE ENTITY • The many-to-many relationship identified in an E-R model shows a complex relationship. • This can be simplified by transforming the relationship to an entity known as composite entity

  5. Composite entity (cont…)

  6. SUPER CLASS ENTITY AND SUBCLASS • A super class is a type of entity which is more general. It has relationship with one or more specific subclass. • A subclass is one or several entities with different attributes from other subclasses but share the same attributes as superclass entity.

  7. Super class and subclass (cont…)

  8. Super class and subclass (cont…)

  9. Application of super class/subclass • Generalisation • Generalisation is a process of creating a type of entity that is more general than a set of special entities. • Specialisation • Specialisation is a process of determining one or several subclasses from an entity (which later becomes a super class).

  10. Generalisation

  11. Generalisation

  12. Specialization

  13. Specilisation

  14. CONSTRAINTS IN SUPERCLASS ANDSUBCLASS RELATIONSHIP • Disjoint Rule • The disjoint rule states that for the same super class, the entity occurrence of a subclass may not become a member of another subclass at the same time. • Overlap Rule • The overlap rule is the opposite of the disjoint rule. • The overlap rule states that in the same super class, an entity occurrence of one subclass can be a member of one or more than one of the other subclasses at the same time.

  15. Disjoint Rule

  16. Overlap Rule

  17. Super class/subclass

  18. Tutorial 1 • The Sri Murni Specialist Hospital (SMSH) administration decided to automate their hospital. The specification of the system has given is listed below. • There are many departments in the hospital and in each department there are many employees working. An employee may work for only one department. • All employees have an employee number, a name and a salary. An employee is identified by his/her employee number. • Each department has a unique department code and a name. There are only three types of departments in the SMSH: (1) inpatient, (2) outpatient and (3) administrative departments. It is possible for a department to be inpatient as well as an outpatient department. In addition to the general attributes of department, inpatient departments have a capacity (number of beds), outpatient departments have an opening time and a closing time, and finally an administrative department has a budget. • There are many different types of employees but two special types are: doctors and nurses. A doctor has two additional attributes; specialization and a unique license number. A nurse has all the attributes of a regular employee and a rank. • Each inpatient department has exactly one supervise who has to be a doctor. • A doctor can be the supervised of more than one inpatient department. • Every day a large number of patients are admitted to the hospital. Each patient has a name and a unique patient number. Some patients are treated in the outpatient departments and some patients are treated in the inpatient departments. The entry date of the patients treated in the inpatient departments should also be stored. It is possible for a patient to be treated in more than one department (inpatient or outpatient) at different times. a) Draw an Extended-Entity-Relationship-Diagram (EERD) for the following problem. Show all entities, relationships, cardinalities and optionalities. You may use any additional entities.

  19. -Thank You-

More Related