Entities and entity Sets in DBMS

Posted By on September 29, 2014


Download PDF
THREE LEVEL ARCHITECTURE OF DBMS
Relationships & Relationship Sets

Entities and Entity Sets

  • An entity is an object that exists and is distinguishable from other objects. For instance, John Harris with S.I.N. 890-12-3456 is an entity, as he can be uniquely identified as one particular person in the universe.
  • An entity may be concrete (a person or a book, for example) or abstract (like a holiday or a concept).
  • An entity set is a set of entities of the same type (e.g., all persons having an account at a bank).
  • Entity sets need not be disjoint. For example, the entity set employee (all employees of a bank) and the entity set customer (all customers of the bank) may have members in common.
  • An entity is represented by a set of attributes.
    • E.g. name, S.I.N., street, city for “customer” entity.
    • The domain of the attribute is the set of permitted values (e.g. the telephone number must be seven positive integers).
  • Formally, an attribute is a function which maps an entity set into a domain.
    • Every entity is described by a set of (attribute, data value) pairs.
    • There is one pair for each attribute of the entity set.
    • E.g. a particular customer entity is described by the set {(name, Harris), (S.I.N., 890-123-456), (street, North), (city, Georgetown)}.

An analogy can be made with the programming language notion of type definition.

  • The concept of an entity set corresponds to the programming language type definition.
  • A variable of a given type has a particular value at a point in time.
  • Thus, a programming language variable corresponds to an entity in the E-R model.

 

We will be dealing with five entity sets in this section:

  • branch, the set of all branches of a particular bank. Each branch is described by the attributes branch-name, branch-city and assets.
  • customer, the set of all people having an account at the bank. Attributes are customer-name, S.I.N., street and customer-city.
  • employee, with attributes employee-name and phone-number.
  • account, the set of all accounts created and maintained in the bank. Attributes are account-number and balance.
  • transaction, the set of all account transactions executed in the bank. Attributes are transaction-number, date and amount.
THREE LEVEL ARCHITECTURE OF DBMS
Relationships & Relationship Sets

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby

Website: http://world4engineers.com