Attributes in DBMS Last Updated : 04 Apr, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report Attributes are properties or characteristics of an entity. Attributes are used to describe the entity. The attribute is nothing but a piece of data that gives more information about the entity. Attributes are used to distinguish one entity from the other entity. Attributes help to categorize the entity and the entity can be easily retrieved and manipulate the entity. Attributes can help the database to be more structural and hierarchical. An entity with no attribute is of no use in the database. ExampleLet's take the student as an entity. Students will have multiple attributes such as roll number, name, and class. These attributes are used to describe the student in more detail. As shown in the figure, roll_no, name, and class are the attributes of the entity Student.All three attributes give meaning to the entity. The information about the student entity lies in all 3 attributes.Types Of AttributeThere are 8 types of attributes in DBMS. Simple Attribute.Composite Attribute.Single Valued Attribute.Multivalued Attribute.Key Attribute.Derived Attribute.Stored Attribute.Complex Attribute. Let's look at all attributes one by one. Simple AttributeSimple attributes are those attributes that cannot be divided into more attributes. Simple attributes state the simple information about the entity such as name, roll_no, class, age, etc.Simple attributes are widely used for storing information about the entity.ExampleHere in the below example, Student has roll_no, class, and name as attributes that cannot be divided into more sub-attributes. These types of attributes are called simple attributes.Simple attributes are mainly used to create all other types of attributes. Simple AttributeComposite AttributeWhen 2 or more than 2 simple attributes are combined to make an attribute then that attribute is called a Composite attribute.The composite attribute is made up of multiple attributes. After combining these attributes, the composed attributes are formed.Complex attributes are used where data is complex and needs to be stored in a complex structure.ExampleHere if we look at the below example, address is the attribute derived from the 3 simple attributes i.e. City, State, and Street. To get the value of the address attribute, we have first to know those city, state, and street attributes. This type of attribute is known as a composite attribute.Composite AttributeSingle Valued AttributeThe attribute with only a single value is known as a single-valued attribute. These attributes have a single value for each instance of a given entity.Mostly these attributes are used to provide the unique identity to the multiple instances of attributes.ExampleIn the given example, we know that the DOB attribute will have only one value. So we can say that the DOB attribute is nothing but a single Valed attribute and it cannot have multiple attributes. Here roll_no and name will also have mostly one value only. We can say that all 3 attributes of the student are single-valued.Single valued attributeMultivalued AttributeAn attribute which can have multiple values is known as a multivalued attribute. Multivalued attributes have multiple values for the single instance of an entity.Keu of entity is associated with multiple values. It does not have only one value. It is the opposite of the single-valued attribute.ExampleHere the student has an attribute named phone_no. One student can have multiple phone_no, so we can say that phone_no can have multiple values. These types of attributes are known as multi-valued attributes. Multi-valued attributes are used when more than 1 entries for one attribute need to be stored in the Database.Multi-valued attributeKey AttributeThe attribute which has unique values for every row in the table is known as a Key Attribute. The key attribute has a very crucial role in the database.The key attribute is a distinct and unique characteristic of the entity that can be used to identify the entity uniquely.ExampleFor students, we can identify every student with roll_no because each student will have a unique roll_no. This indicates that roll_no will be a Key attribute for the Student entity. All operations on the database can be performed only using Key Attributes.Key attributeDerived AttributeThe attribute that can be derived from the other attributes and does not require to be already present in the database is called a Derived Attribute.Derived attributes are not stored in the Database directly. It is calculated by using the stored attributes in the database.ExampleHere the student has multiple attributes including DOB and age. It is observed that age can be calculated with the help of the DOB attribute. So age is a derived attribute that is derived from an attribute named DOB. Derived attributeStored AttributeIf the data of the attribute remains constant for every instance of entity then it is called a Stored Attribute.The value of the attribute present in the database does not get updated and it remains constant once it is stored.These attributes are used to store permanent information about an entity which will remain constant throughout the lifetime of the entity. ExampleThe student has 3 attributes as shown above. Her name and DOB will remain the same throughout his/her education. So the student has a fixed value attribute that will never change in the future. These attributes are known as stored attributes. Stored attributesComplex AttributeWhen multi-valued and composite attributes together form an attribute then it is called a Complex attribute.Complex attributes can have an unlimited number of sub-attributes.ExampleHere for the student, we created an attribute named contact_info which further decomposed into phone_no + Address. The address is a composite attribute which is further divided into simple attributes and phone_no is a multivalued attribute. This indicates that the contact_info attribute is made from the multi-valued and composite attribute. This type of attribute is known as the Complex Attribute.Complex attributes Comment More infoAdvertise with us Next Article Attributes in DBMS K kartikdonwade45 Follow Improve Article Tags : DBMS Similar Reads Composite Attribute in DBMS In DBMS (Database Management System), keys are fundamental to maintaining the integrity and efficiency of the data. Among various types of keys, composite keys play an important role mainly when a single attribute is not sufficient to answer or identify a record. In this article, we will discuss in 4 min read Derived Attribute in DBMS An entity is nothing but a piece of data that can be uniquely identified in the database. For example, in a university database, a student is an entity. The teacher is also an entity as it can be uniquely identified. AttributesAttributes are the properties of the entity. Attributes are used to give 4 min read Multivalued Attributes in DBMS Attributes are significant in DBMS as it deals with the organization and formatting of data. Of all the attributes, multivalued attributes are somewhat different and they have to be understood properly. To help us understand the above idea in the subsequent sections of this article, we will also exp 6 min read Alternate Key in DBMS Keys play an important role in organizing and accessing data in the database management system. There are many key types of keys but primary keys are mostly discussed because of their unique identification properties, we can identify the attributes of an element with the primary key, but there are a 4 min read Access Types in DBMS Access is a database management system that is a part of the Microsoft 365 suite and a database in Access is comprised of four objects: table, query, form, and report. In this article, we will discuss all these objects in brief and will understand what is the contribution of each object type in a re 3 min read Like