The Entity Relationship Model

 

 

Defining relationships within a database can improve search capabilities and optimal performance of the database in the long run.

Identify at least two relationship strength types that can be used within the entity relationship model.
Provide a real-world scenario that demonstrates each relationship strength classification, using the classifications.
 

Sample Answer

 

 

 

 

 

 

 

Relationship Strength Types in Entity-Relationship Model

In the Entity-Relationship (ER) model, relationship strength defines how entities are connected and whether one entity's existence depends on another. The two primary relationship strength types are:

Identifying (Strong) Relationship

  • Definition: The child entity's primary key includes the parent entity's primary key. The child cannot exist without the parent.
  • ER Notation: Solid line connecting entities.
  • Real-World Scenario: University Course Enrollment
    • Entities:
      • Department (parent): Primary key = department_id.
      • Course (child): Primary key = (department_id, course_code).
    • Relationship:
      • A Course must belong to a Department (e.g., "CS101" exists only under the Computer Science department).
      • The department_id is part of the Course's primary key, making this an identifying relationship.
    • Why Identifying?
      • Courses are defined within departments; a course cannot exist independently of its department.

Non-Identifying (Weak) Relationship

  • Definition: The child entity has its own primary key and does not include the parent's primary key. The child can exist without the parent.
  • ER Notation: Dashed line connecting entities.
  • Real-World Scenario: Online Bookstore Orders
    • Entities:
      • Customer (parent): Primary key = customer_id.
      • Order (child): Primary key = order_id (independent of customer_id).
    • Relationship:
      • An Order is placed by a Customer, but an order record can reference a customer_id (foreign key) without being part of its primary key.