Derived Attribute in DBMS

Learn via video course
FREE
View all courses
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
Topics Covered

There are multiple types of attributes or properties associated with a given database. While some of these are unique, many of these are derived attributes that are derived from these unique attributes. These attributes in DBMS are known as derived attributes.

What is Derived Attribute in DBMS?

A derived attribute is an attribute or property in a table that has been calculated or derived using other attributes in the database. The data of a derived attribute is derived or copied from the attributes of another table lying in the same database. They don't exist physically in the database.

Example of A Derived Attribute

For example, if the age of a student in a database is not known, the age could be derived from the date of birth of the student in the database.

DERIVED ATTRIBUTE 1

Deriving the age of the student, DERIVED ATTRIBUTE 2

Let us take another example.

Consider the following record of the Employee table; (‘101’, ‘ABC’, ’10-March-2016’, 0) which has fields Employee ID, Name, Date of joining and years of experience respectively.

This record shows that the employee ABC joined on the 10th of March, 2016. At the time of record insertion, he has zero years of experience. However, by 10th March 2022, he will have nearly 6 years of experience. This is how the value of years of experience could be derived based on the date of joining. This is an important example of derived attributes.

Representation of the Derived Attribute

An ER model in DBMS, or an entity-relationship model is used to establish the interrelation amongst different entities in a database. In the ER model, the derived attributes are represented by a dashed oval. The name of the derived attribute is positioned inside the oval.

DERIVED ATTRIBUTE 3

Difference between Derived and Stored Attributes

Derived AttributesStored Attributes
Derived attributes are not physically stored since they are derived from other attributesThey are explicitly stored in a database
Derived attribute values can be determined from another attributeIt is not possible to determine stored attribute value from another attribute
Derived attributes are variableStored attributes have constant/fixed values
Derived attributes are represented by a dotted ovalStored attributes are represented by an oval
Data access time and CPU time are longer in derived attributesData access time and CPU time are lesser in stored attributes .

Conclusion

  1. A derived attribute is a type of attribute where the value for that attribute will be derived from one or more of the other attributes of the same database.
  2. In the ER model, the derived attributes are represented by a dashed oval.
  3. Derived attributes are not explicitly stored. They are derived from other attributes.
  4. Derived attributes differ from stored attributes in multiple aspects including access time, CPU time, etc.

Read More: