Attribute in DBMS

Attributes

  • Attributes define what type of data is stored in a database table
  • For example student table stores the details of Student name, roll no, marks, attendance, etc  all these details corresponding the properties or attributes of the student table
  • There are 6 types of attributes
    • Simple attributes
    • Composite attributes
    • Single valued attributes
    • Multi valued attributes
    • Derived attributes
    • Key attributes
Attributes

Simple Attributes

Simple attributes are those attributes which can not be divided further.

Example

All the attributes are simple attributes as they can not be divided further.

Composite Attributes

Composite attributes are those attributes which are composed of many other simple attributes.

Example

The attributes “Name” and “Address” are composite attributes as they are composed of many other simple attributes.

Single Valued Attributes

Single valued attributes are those attributes which can take only one value for a given entity from an entity set.

Example

All the attributes are single valued attributes as they can take only one specific value for each entity.

Multi Valued Attributes

Multi valued attributes are those attributes which can take more than one value for a given entity from an entity set.

Example

The attributes “Mob_no” and “Email_id” are multi valued attributes as they can take more than one values for a given entity.

Single-Valued_Multi-valued

Derived Attributes

Derived attributes are those attributes which can be derived from other attribute(s).

Example

The attribute “Age” is a derived attribute as it can be derived from the attribute “DOB”.

Key Attribute

Key attributes are those attributes which can identify an entity uniquely in an entity set.

Example

The attribute “Roll_no” is a key attribute as it can identify any student uniquely.