Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

Weak Relationships and Entities

Author: Sophia

what's covered
This tutorial explores weak relationships and entities in entity-relationship diagrams (ERD) in two parts:
  1. Relationship Strength
  2. Strong and Weak Entities

1. Relationship Strength

The relationship strength is important to determine how the primary key of a related identity is defined. There are instances when the primary key of one entity only appears as the foreign key in the related entity. In those cases, you have a weak relationship. There are other times when the foreign key is also the primary key component in the related entity, which creates a strong relationship. Chen’s notation does not distinguish in a diagram the difference between a weak and strong relationship. In Crow’s foot notation, a dashed relationship line is used to signify a weak relationship. This is not always used in diagraming ERDs. However, it is useful to know this if you do see it in a diagram.


2. Strong and Weak Entities

You identified the strength of entities back in Unit 4, entities in ERDs can also be strong or weak. A strong entity can exist without any dependency on any other relationship. Typically, these entities do not have any foreign keys. These tables are ones that you would typically create first since they don’t depend on other entities. In fact, other entities typically depend on them.

Weak entities meet one of two criteria:

  1. The first criterion that defines a weak entity is if it is existence-dependent. This means that it cannot exists without the entity that it has a relationship with.
  2. The other criteria of a weak entity is if the entity has a primary key that is partially or entirely derived from the parent entity in the relationship. This means that if there is a strong relationship, the entity that derives from the other table is a weak entity.
In Crow’s foot notation, a weak entity is signified by the relationship line and the primary key/foreign key.

In Chen’s notation, a weak entity is signified by a double wall on the entity (a double rectangular box).

EXAMPLE

For example, look at the Rating entity in your current design (below). The Rating entity is existence-dependent. It has dependencies on both the user and the movie. A rating cannot exist without having a user that submitted the rating. A rating also cannot exist without being connected to a movie. You have not normalized the database yet to create a bridge entity between movie/actor and movie/genre, but those bridge entities would also be weak entities.

Entity-relationship diagram

term to know
Existence-dependent
This means that it cannot exists without the entity that it has a relationship with.

summary
In this tutorial, you learned that knowing relationship strength is important to determine how the primary key of a related identity is defined. You saw the difference between a strong and weak relationship. Then you learned that entities can be strong and weak as well. A strong entity can exist without any dependency on any other relationship. However, a weak entity is either existence-dependent or the entity has a primary key that is partially or entirely derived from the parent entity in the relationship.

Source: Authored by Vincent Tran

Terms to Know
Existence-dependent

This means that it cannot exists without the entity that it has a relationship with.