Weak Entity Types

  • Definition:

    • Weak entity types are those without their own key attributes, unlike strong entity types that possess key attributes.
  • Identification of Weak Entities:

    • Weak entities depend on an identifying (owner) entity type for their identification.
    • They are identified by their relationship to a specific entity from another type, combined with their attribute values.
  • Identifying Relationship:

    • The relationship connecting a weak entity type to its owner entity type is termed the identifying relationship.
  • Total Participation Constraint:

    • Weak entities have a total participation constraint with respect to their identifying relationship; they cannot exist without being linked to an owner entity.
    • Note: Not every existence dependency leads to the creation of a weak entity type.
    • Example: A DRIVER_LICENSE requires a PERSON but is not a weak entity since it has its own key (License_number).
  • Example of Weak Entity:

    • DEPENDENT entity linked to EMPLOYEE.
    • Attributes of DEPENDENT:
      • Name (first name of the dependent)
      • Birth_date
      • Sex
      • Relationship (to the employee)
    • Despite the potential for multiple DEPENDENTs to have the same attribute values, they are distinct when associated with a specific EMPLOYEE.
  • Ownership:

    • Each employee is considered to own the dependents linked to them.
  • Partial Key:

    • A weak entity type usually has a partial key to uniquely identify its entities related to the same owner.
    • Example: Assume no two dependents of the same employee share the same first name; thus, the attribute Name for DEPENDENT serves as the partial key.
  • ER Diagram Representation:

    • In ER diagrams, weak entity types and their identifying relationships are depicted with double-lined boxes and diamonds.
    • The partial key attribute is illustrated underlined with dashed lines.
  • Complex Attributes:

    • Weak entity types can also be shown as composite or multivalued attributes.
    • Example: A multivalued attribute Dependents for EMPLOYEE can encompass attributes like Name, Birth_date, Sex, and Relationship.
  • Design Considerations:

    • Database designers must decide on the representation based on the weak entity's participation in relationships beyond its identifying relationship type.
  • Hierarchical Weak Entities:

    • Multiple levels of weak entity types can be defined where an owner entity type might also be a weak entity, and a weak entity can have multiple identifying entity types and relationships more complex than degree two.
  • Terminology:

    • Identifying entity type: parent or dominant entity type.
    • Weak entity type: child or subordinate entity type.
    • Partial key: also known as the discriminator.