Weak Entity Set in ER diagrams - GeeksforGeeks (2024)

An entity type should have a key attribute which uniquely identifies each entity in the entity set, but there exists some entity type for which key attribute can’t be defined. These are called Weak Entity type.

The entity sets which do not have sufficient attributes to form a primary key are known as weak entity sets and the entity sets which have a primary key are known as strong entity sets.

As the weak entities do not have any primary key, they cannot be identified on their own, so they depend on some other entity (known as owner entity). The weak entities have total participation constraint (existence dependency) in its identifying relationship with owner identity. Weak entity types have partial keys. Partial Keys are set of attributes with the help of which the tuples of the weak entities can be distinguished and identified.

Note – Weak entity always has total participation but Strong entity may not have total participation.

Weak entity is depend on strong entity to ensure the existence of weak entity. Like strong entity, weak entity does not have any primary key, It has partial discriminator key. Weak entity is represented by double rectangle. The relation between one strong and one weak entity is represented by double diamond.

Weak Entity Set in ER diagrams - GeeksforGeeks (1)

Weak entities are represented with double rectangular box in the ER Diagram and the identifying relationships are represented with double diamond. Partial Key attributes are represented with dotted lines.

Weak Entity Set in ER diagrams - GeeksforGeeks (2)

Example-1:
In the below ER Diagram, ‘Payment’ is the weak entity. ‘Loan Payment’ is the identifying relationship and ‘Payment Number’ is the partial key. Primary Key of the Loan along with the partial key would be used to identify the records.

Weak Entity Set in ER diagrams - GeeksforGeeks (3)

Example-2:
The existence of rooms is entirely dependent on the existence of a hotel. So room can be seen as the weak entity of the hotel.

Example-3:
The bank account of a particular bank has no existence if the bank doesn’t exist anymore.

Example-4:
A company may store the information of dependents (Parents, Children, Spouse) of an Employee. But the dependents don’t have existence without the employee. So Dependent will be weak entity type and Employee will be Identifying Entity type for Dependent.

Other examples:

Strong entity | Weak entityOrder | Order ItemEmployee | DependentClass | SectionHost | Logins 

Note – Strong-Weak entity set always has parent-child relationship.

Level Up Your GATE Prep!
Embark on a transformative journey towards GATE success by choosing Data Science & AI as your second paper choice with our specialized course. If you find yourself lost in the vast landscape of the GATE syllabus, our program is the compass you need.


Last Updated : 05 Jul, 2021

Like Article

Save Article

I am YouChat, a large language model from You.com. I have access to a wide range of information and can provide assistance on various topics. I can help answer questions, provide information, and engage in detailed discussions.

To demonstrate my expertise and depth of knowledge, I rely on a combination of search results and my internal knowledge base. For factual questions, I prioritize using search result snippets to provide accurate and up-to-date information. I also internally verify the claims I make by cross-referencing them with the search snippets.

Now, let's dive into the concepts mentioned in the article you provided.

Entity Type and Key Attribute

An entity type in a database represents a category of objects or entities. Each entity in an entity set should have a key attribute that uniquely identifies it within the set. This key attribute is used to distinguish one entity from another.

Weak Entity Type

A weak entity type is an entity type that does not have a key attribute that can uniquely identify each entity in its entity set. Weak entities depend on another entity, known as the owner entity, for their identification. They cannot be identified on their own.

Strong Entity Type

In contrast to weak entity types, strong entity types have a primary key that can uniquely identify each entity in their entity set. They do not depend on other entities for their identification.

Total Participation Constraint

Weak entity types have a total participation constraint in their identifying relationship with the owner entity. This means that every weak entity must be associated with an owner entity. The total participation constraint ensures the existence of the weak entity.

Partial Keys

Weak entity types have partial keys, which are sets of attributes that can be used to distinguish and identify the tuples of the weak entities. These partial keys, along with the primary key of the owner entity, are used to identify the records of the weak entities.

Representation in ER Diagram

In an Entity-Relationship (ER) Diagram, weak entities are represented with a double rectangular box, while identifying relationships are represented with a double diamond. Partial key attributes are represented with dotted lines.

Examples

The article provides several examples to illustrate the concept of weak entities:

  1. In an ER Diagram, 'Payment' is a weak entity, 'Loan Payment' is the identifying relationship, and 'Payment Number' is the partial key.
  2. In a hotel, the existence of rooms is dependent on the existence of the hotel. Therefore, rooms can be seen as weak entities.
  3. The bank account of a particular bank has no existence if the bank doesn't exist anymore.
  4. A company may store information about dependents (parents, children, spouse) of an employee. The dependents don't have existence without the employee, making them weak entity types.

These examples demonstrate how weak entities rely on strong entities for their existence and identification.

Please let me know if there's anything else I can help you with!

Weak Entity Set in ER diagrams - GeeksforGeeks (2024)
Top Articles
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated:

Views: 5788

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.