DBMS Menu


Entity in DBMS




Entity: An entity is anything in the real world, such as an object, class, person, or place. Objects that physically exist and are logically constructed in the real world are called entities. An entity is distinguishable from other entity.

Entity type: The entity type is a collection of the entity having similar attributes.

Entity set: is a group of entities of similar kinds. It can contain entities with attributes that share similar values. It's collectively a group of entities of a similar type. The entity set need not be disjoint.

In summary, an Entity is an object of a Type Entity and the set of all entities is called an entity set.

Entities are of two types:

Strong Entity – A strong entity is an entity type that has a key attribute. It doesn't depend on other entities in the schema. A strong entity always has a primary key, and it is represented by a single rectangle in the ER diagram.

Weak Entity – Weak entity type doesn’t have a key attribute and so we cannot uniquely identify them by their attributes alone. Therefore, a foreign key must be used in combination with its attributes to create a primary key. They are called Weak entity types because they can’t be identified on their own. It relies on another powerful entity for its unique identity. A weak entity is represented by a double-outlined rectangle in ER diagrams.

Strong Entity v/s Weak Entity

Strong Entity Weak Entity
Strong entity always has a primary key. While a weak entity has a partial discriminator key.
Strong entity is not dependent on any other entity. Weak entity depends on strong entity.
Strong entity is represented by a single rectangle. Weak entity is represented by a double rectangle.
Two strong entity’s relationship is represented by a single diamond. While the relation between one strong and one weak entity is represented by a double diamond.
Strong entities have either total participation or not. While weak entity always has total participation.

Next Topic :Relationships in DBMS