Coupon Accepted Successfully!


Data model

A data model is a plan for building a database. The model represents data conceptually, the way the user sees it, rather than how computers store it. Data models focus on required data elements and associations.

1. Entity-Relationalship Model

2. Relational Model

Entity Relationship Model

Entity- a thing (animate or inanimate) of independent physical or conceptual existence and distinguishable. In the University database context, an individual student, faculty member, a class room, a course are entities.

Entity Set or Entity Type-

  • Collection of entities all having the same properties.
  • Student entity set - collection of all student entities.
  • Course entity set - collection of all course entities.

Student entity

  • Student Name - name of the student.
  • Roll Number - the roll number of the student.
  • Sex - the gender of the student etc.
  • All entities in an Entity set/type have the same set of attributes. Chosen set of attributesamount
  • of detail in modeling.


Each entity is described by a set of attributes/properties.

Types of Attributes

  • Simple Attributes: having atomic or indivisible values. example: Dept – a string Phone Number - an eight digit number
  • Composite Attributes: having several components in the value. example: Qualification with components (Degree Name, Year, University Name)
  • Derived Attributes: Attribute value is dependent on some other attribute. example: Age depends on Date Of Birth. So age is a derived attribute.
  • Single-valued: having only one value rather than a set of values. for instance, Place Of Birth - single string value.
  • Multi-valued: having a set of values rather than a single value. for instance, Courses Enrolled attribute for student Email Address attribute for student Previous Degree attribute for student.
  • Attributes can be: simple single-valued, simple multi-valued, composite single-valued or composite multi-valued.

Sub- Diagrammatic Notation for Entities

entity - rectangle

attribute - ellipse connected to rectangle

multi-valued attribute - double ellipse

composite attribute - ellipse connected to ellipse

derived attribute - dashed ellipse


Domains of Attributes

Each attributes takes values from a set called its domain

For instance, CustomerAge – {18,19, …, 55}

Address – character strings of length 35

Domain of composite attributes –cross product of domains of component attributes

Domain of multi-valued attributes – set of subsets of values from the basic domain

Entity Sets and Key Attributes

Key – an attribute or a collection of attributes whose value(s) uniquely identify an entity in the entity set. For instance, RollNumber - Key for Student entity set,

EmpID - Key for Faculty entity set, HostelName, RoomNo - Key for Student

entity set (assuming that each student gets to stay in a single room)

  • A key for an entity set may have more than one attribute.
  • An entity set may have more than one key.
  • Keys can be determined only from the meaning of the attributes in the entity type.
  • Determined by the designers

Test Your Skills Now!
Take a Quiz now
Reviewer Name