E-R Model

Introduction :- E-R Model is also called Entity-Relationship Model. It is a high level conceptual data model developed by Peter den in 1976 to facilitate database design. The conceptual data model is a data of concepts that describe the structure of a database and associated retrieval ans updating transaction on the database.

Basic terms of E-R Model

Entity :- It is data object which information can be collected and stored. i.e. Student, teacher, etc.

  • Weak entity :- An entity that does not have an attribute which may act as a primary key or key attribute is called weak entity. The weak entity diagram represented to double outline box. i.e. Consider weak entity EMPLOYEE having attribute Name, Age, Sex.
  • Strong entity :- An entity have an attribute which may act as a primary key or key attribute is called strong entity. The strong entity diagram represented by single outline box. i.e. Consider strong entity STUDENT having attribute Roll-no, Name, Sex, Class.

Attribute :- An Attribute is a characteristics or properties of an entity. i.e. Name,Salary, Job of an entity employee.

  • Simple attribute :- A simple attribute that consist of a single atomic value. It can not be further subdivided. i.e. Age, Salary, etc.
  • Composite attribute :- A composite attribute that can be further divided into subparts or components. i.e. An address of attribute can be composed of components like: House no, Street no, Area, City and so on.
  • Single-value attribute :- A single-value attribute can have only a single value. i.e. A person can have one “Date-of-birth”, “Age”, etc.
  • Multi-value attribute :- A multi-value attribute can have multi values. i.e. A person may have multi Phone no, degree, etc.
  • Stored attribute :- A store attribute that supplies a value to the related attribute. i.e. Date-of-birth.
  • Derived attribute :- A derived attribute that value is derived from a stored attribute. i.e. The value Age is derived from stored attribute Date-of-birth.

Relationship :- A relationship associated in two or more entity. i.e. A student enrolls in a course. Here “student” and “course” are two different entities and relationship between them is “enroll”.

  • One-to-Many relationship :- In relationship only one entity of the first set is related to multiple entities of the second set. i.e. A teacher teaches students. only one teacher is teaching many student.
  • Many-to-One relationship :- In relationship multi entities of the first set are related to only one entity of the second set. i.e. A teachers teach a student. Many teachers are teaching only one student.
  • Many-to-Many relationship:- In relationship multiple entity of the first set are related to multiple entities of the second set.i.e. Teachers teach students.