DBMS Menu


Attributes in DBMS




Attributes define the properties of a data object of entity. For example if student is an entity, his ID, name, address, date of birth, class are its attributes.

Types of Attributes in DBMS

1. Simple Attributes:

Simple attributes are attributes that are drawn from the atomic value domains, which cannot be divided further.

2. Composite attribute:

Composite attributes are those attributes which are composed of many other simple attributes. Composite attributes are made of more than one simple attribute. For example, a student's complete name may have first-name and last-name.

Simple Vs. Composite Attributes

Simple Attribute Composite Attribute
The attribute which cannot further split into its components is a simple attribute. The file system provides the details of data representation and storage of data.
Example: The marks of a student, the age of an employee etc. Example: Name of the student can split into first, middle and last name.

3. Single Valued Attributes:

Single valued attributes are those attributes which can take only one value for a given entity from an entity set. Single-value attributes contain single value. For example − age, gender etc.,.

4. Multi Valued Attributes:

Multi valued attributes are those attributes which can take more than one value for a given entity from an entity set. Multi-value attributes may contain more than one values. For example, a person know more than one Languages, hobbies etc.

Single-Valued Vs. Multi-Valued Attributes

Single-Valued Attribute Multi-Valued Attribute
The attribute which has a single value for each entity instance is known as single-valued attribute. There is no alternative of this value. The attribute which takes up more than one value for each entity instance is known as multi valued attribute.
Example: The RollNo, DOB, Gender of a student will always be a single value. Example: A person know more than one Languages, and there hobbies

5. Derived Attributes:

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

Derived attributes are the attributes that do not exist in the physical database, but their values are derived from other attributes present in the database. For example, age of the student should not be saved directly in the database, instead it can be derived from Date of Birth.

Stored Vs. Derived Attributes

Stored Attribute Derived Attributes
An attribute which cannot derive from other attributes and it is mandatory to be stored in the database. An attribute which is determine the value from other attributes is a derived attribute and it is not mandatory to be stored in the database.
Example: The value which is fixed like Date of Birth. Example: Age of student can be derived from DOB.

6. Key Attributes:

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

Key is an attribute or collection of attributes that uniquely identifies an entity among entity set. For example, the roll_number of a student makes him/her identifiable among students.


Student Entity with all types of Attributes


Next Topic :Entity in DBMS