Example the supervision relationship employee

Info icon This preview shows pages 33–41. Sign up to view the full content.

Example: the SUPERVISION relationship EMPLOYEE participates twice in two distinct roles: supervisor (or boss) role supervisee (or subordinate) role Each relationship instance relates two distinct EMPLOYEE entities: One employee in supervisor role One employee in supervisee role The Entity-Relationship Model 33
Image of page 33

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Displaying a Recursive Relationship In a recursive relationship type: Both participations are same entity type in different roles. For example, SUPERVISION relationships between EMPLOYEE (in role of supervisor or boss) and (another) EMPLOYEE (in role of subordinate or worker). In following figure, first role participation labeled with 1 and second role participation labeled with 2. In ER diagram, need to display role names to distinguish participations. The Entity-Relationship Model 34
Image of page 34
A Recursive Relationship: Supervision The Entity-Relationship Model 35
Image of page 35

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

A Recursive Relationship: Supervision The Entity-Relationship Model 36
Image of page 36
Weak Entity Types An entity that does not have a key attribute and that is identification-dependent on another entity type. A weak entity must participate in an identifying relationship type with an owner or identifying entity type Entities are identified by the combination of: A partial key of the weak entity type The particular entity they are related to in the identifying relationship type Example: A DEPENDENT entity is identified by the dependent’s first name, and the specific EMPLOYEE with whom the dependent is related Name of DEPENDENT is the partial key DEPENDENT is a weak entity type EMPLOYEE is its identifying entity type via the identifying relationship type DEPENDENT_OF The Entity-Relationship Model 37
Image of page 37

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Attributes of Relationship types A relationship type can have attributes: For example, HoursPerWeek of WORKS_ON Its value for each relationship instance describes the number of hours per week that an EMPLOYEE works on a PROJECT. A value of HoursPerWeek depends on a particular (employee, project) combination Most relationship attributes are used with M:N relationships In 1:N relationships, they can be transferred to the entity type on the N-side of the relationship The Entity-Relationship Model 38
Image of page 38
Example Attribute of a Relationship Type: Hours of WORKS_ON The Entity-Relationship Model 39
Image of page 39

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Notation for Constraints on Relationships Cardinality ratio (of a binary relationship): 1:1, 1:N, N:1, or M:N Shown by placing appropriate numbers on the relationship edges. Participation constraint (on each participating entity type): total (called existence dependency) or partial. Total shown by double line, partial by single line. NOTE: These are easy to specify for Binary Relationship Types.
Image of page 40
Image of page 41
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '09
  • SUNANHAN
  • Entity-relationship model, ER Diagrams

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern