What is Entity in DBMS | Types of Entity set

entity image


Entity:-

An entity is an ‘object’ in the ‘actual world’, and that can be identified from the other objects. Here, a question arises that how an entity is different from other entity? For this, we need to know how an entity is expressed.

Well, an entity in a database is represented as a set of attributes. Each entity has a different set of values for some set of attributes and this is how an entity seems to be distinct from other entities. In a relational model, an entity is represented as a row, tuple or a record.

Entity set:- 

The complete data set of all entities is called the entity set. In the above table, the entity set consists of all the records. In other words, the records with id 1, 2 and 3 represent the entire data set. It is the entity set. Therefore, entity set refers to all records in the Student table. Overall, the entity set denotes all records of a specific entity type.

Types of entity sets:-

  1. Strong entity set
  1. Weak entity set

1. Strong Entity Set :-

 

  • A strong entity set is an entity set that contains sufficient attributes to uniquely identify all its entities.
  • In other words, a primary key exists for a strong entity set.
  • Primary key of a strong entity set is represented by underlining it.

Symbols Used :-

  • A single rectangle is used for representing a strong entity set.
  • A diamond symbol is used for representing the relationship that exists between two strong entity sets.
  • A single line is used for representing the connection of the strong entity set with the relationship set.
  • A double line is used for representing the total participation of an entity set with the relationship set.
  • Total participation may or may not exist in the relationship.

2. Weak Entity Set:-

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.

The weak entity is shown by a rectangle in an ER diagram. But, the attributes of weak entity set are underlined with the dashed line. The relationship of a weak entity set and strong entity set is shown with the double diamond.

*******************************************************************************************************

एसी ही नया टेक्नोलॉजी ,Programming Language , Coding , C Language, C++ and computer system से रिलेटेड जानकारियाँ पाने के लिए हमारे इस वेबसाइट www.contents4you.com को सब्सक्राइब कर दीजिए | जिससे हमारी आने वाली नई पोस्ट की सूचनाएं जल्दी प्राप्त होगी |

अगर आपको Post पसंद आये  है तो अपने  friends और  social media पर share करे.