Types of Attributes in DBMS
Types of Attributes in DBMS
✓ Attributes are the characteristic properties that define all the items belonging to a specific category applied
to every column cell.
✓ The values that are used to describe a specific member or attribute as a column in an entity table.
✓ Suppose we have several students in a class; we can uniquely identify a student by the properties
associated with a student, like a student roll number, name, branch, age, etc. These properties that describe
an entity are attributes for students.
Note: To uniquely identify the student entity, we may use the primary key as Roll_No as it is not
repeated.
Take a look at the following database table "student" when students' information is stored.
Here, to store information about every student, we are storing his name, id, age, and branch of each student in
four columns. The properties of student that are student_id, student_age, student_name, student_name are
the attributes for student.
✓ Independent attributes
• Student is an entity represented by a rectangle, and it consists of attributes: Roll_no, class, and Age.
• Note : We cannot further subdivide the Roll_no attribute and the other two attributes into sub-attributes.
• Such attributes that cannot be further sub-divided into several attributes are called simple
attributes. Example: attributes like the current class and branch of a student have an absolute value, and
Name
• Address attribute can be further subdivided into many simple attributes like Street, City, State,
Country.
• Student_name can be further divided into sub-parts like first_name, middle_name, and last_name
03. Multi-valued Attribute
✓ Attributes that can have multiple sets of values for a single entity are known as Multi-valued attributes.
✓ Can store more than one value at a time for a given entity instance from a set of possible values.
✓ Represented by co-centric elliptical shape, and we can also use curly braces { } to represent multi-valued
• Attributes like Mob_number, Email_id, are categorized as multi-valued attributes because a single
student in the class can have more than one phone number, email_id, and hobbies.
Note : Each student in the real world can provide more than one email-id as well as a mobile contact number, and
therefore, we need these attributes to be multi-valued so that they can store multiple values at a time for an entity
instance.
04. Derived Attributes
✓ Such attributes whose value can be derived from other attributes of the entity are called derived attributes
in DBMS.
✓ They are always dependent upon other attributes for their value.
• From DOB, we can derive the Age attribute, which changes every year, and can easily calculate the
• Hence, the Age attribute here is derived attribute from the DOB single-valued attribute.
.
05. Complex Attribute
Example : A person owns more than one house, and each house has more than one phone number. Then,
• Address_EmPhone (which represents Address, Email, and Phone number altogether) is a complex
attribute.
• Email and Phone number are multi-valued attributes while Address is a composite attribute which is
• This combination of multi-valued and composite attributes altogether forms a complex attribute.
06. Stored Attributes
✓ An attribute whose values can be calculated from related stored attribute values.
✓ Values of stored attributes remain constant and fixed for an entity instance and also, and they help in
Example : The Age attribute can be derived from the Date of Birth attribute, and also, the Date of
birth attribute has a fixed and constant value throughout the life of an entity. Hence, the Date of
• As we can see in the above image, there are different types of attributes in DBMS, well slotted for each
field for an entity instance.
07. Key Attributes
✓ Key attributes are special types of attributes that act as the primary key for an entity and they can uniquely
✓ The values that key attributes store must be unique and non-repeating.
• The Roll_no attribute of the Student entity is not only simple and single-valued attribute but also, a key
• Also note that the Gender and Age of two or more persons can be same and overlapping in nature and
obviously, we can't identify a student on the basis of them. Hence, gender and age are not key-valued
attributes.
Conclusion
• Attributes in DBMS help us to study the characteristics and properties of an entity instance, and we can
also study the relations within the system. Attributes in DBMS are represented by elliptical shapes.
• An entity may contain any number of attributes while one of the attributes is considered to be a primary
key attribute.
• There are different types of attributes in DBMS: Simple, Composite, Single Valued, Multi-Valued,
Stored, Derived, Key, and Complex attributes.
• Simple attributes can't be further subdivided into any other component, and hence, they are also known
as atomic attributes.
• Composite attributes can be further subdivided and hence, are composed of many other simple attributes.
• Single valued attributes consist of a single value for each entity instance and can’t store more than one
value.
• Multi-valued attributes can take up and store more than one value at a time for an entity instance from a
set of possible values. They are represented by a co-centric elliptical shape.
• Derived attributes are those attributes whose values can be derived from the values of other attributes.
• Key attributes act as the primary key for an entity, and they can uniquely identify an entity from an entity
set.
• Complex attributes are formed by the combination of multi-valued and composite attributes.
• Values of stored attributes remain constant and fixed for an entity instance.