Skip to content
Related Articles

Related Articles

Types of Attributes in ER Model

View Discussion
Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 24 Dec, 2021
View Discussion
Improve Article
Save Article

Prerequisite – Introduction of ER Model 

An attribute is a property or characteristic of an entity. An entity may contain any number of attributes. One of the attributes is considered as the primary key. In an Entity-Relation model, attributes are represented in an elliptical shape. 

Example: Student has attributes like name, age, roll number, and many more. To uniquely identify the student, we use the primary key as a roll number as it is not repeated. Attributes can also be subdivided into another set of attributes. 

There are five such types of attributes: Simple, Composite, Single-valued, Multi-valued, and Derived attribute. One more attribute is their, i.e. Complex Attribute, this is the rarely used attribute. 

Simple attribute : 

An attribute that cannot be further subdivided into components is a simple attribute. 
Example: The roll number of a student, the id number of an employee. 

Composite attribute : 

An attribute that can be split into components is a composite attribute. 

Example: The address can be further split into house number, street number, city, state, country, and pin code, the name can also be split into first name middle name, and last name. 

Single-valued attribute : 

The attribute which takes up only a single value for each entity instance is a single-valued attribute. 

Example: The age of a student. 

Multi-valued attribute : 

The attribute which takes up more than a single value for each entity instance is a multi-valued attribute. 

Example: Phone number of a student: Landline and mobile. 

Derived attribute : 

An attribute that can be derived from other attributes is derived attributes. 

Example: Total and average marks of a student. 

Complex attribute : 

Those attributes, which can be formed by the nesting of composite and multi-valued attributes, are called “Complex                 Attributes“. These attributes are rarely used in DBMS(DataBase Management System). That’s why they are not so popular.

Representation: 

Complex attributes are the nesting of two or more composite and multi-valued attributes. Therefore, these multi-valued and composite attributes are called ‘Components’ of complex attributes.

            These components are grouped between parentheses ‘( )’ and multi-valued attributes between curly braces ‘{ }’, Components are separated by commas ‘, ‘.

For example let us consider a person having multiple phone numbers, emails, and an address.

Here, phone number and email are examples of multi-valued attributes and address is an example of the composite attribute, because it can be divided into house number, street, city, and state.

Complex attributes

Complex attributes

Components: 

Email, Phone number, Address(All are separated by commas and multi-valued components are represented between curly braces).  

Complex Attribute: Address_EmPhone(You can choose any name).

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!