A weak entity is an entity that cannot be uniquely identified by its own attributes alone. Unlike regular entities, weak entities depend on a strong (or owner) entity for their identification. They do not have a primary key of their own and rely on a combination of their attributes and the primary key of the owner entity to form a unique identifier.
Characteristics of Weak Entities
- Dependent on Strong Entity: A weak entity is associated with a strong entity and relies on it for identification.
- Partial Key: Weak entities have a partial key (also known as a discriminator), an attribute or set of attributes that can uniquely identify the weak entity within the context of the owner entity.
- Existence Dependency: Weak entities have an existence dependency, meaning they cannot exist independently without their associated strong entity.
- Double Rectangle Representation: In ER diagrams, weak entities are represented by double rectangles, and their relationships with strong entities are shown with double diamonds.
Example of a Weak Entity
Consider a university database with two entities: Course (strong entity) and Course Section (weak entity).
- Strong Entity: Course
- Attributes: Course ID, Course Name
- Weak Entity: Course Section
- Attributes: Section Number (partial key), Instructor, Time