What is an Attribute and types with Examples: Generally attribute explains the characteristics of an entity. In database management system (DBMS) it assigns a database component or database field. Attribute stores or saves only a piece of data. For example, in an invoice the attribute may be the price or date. In this article, we will discuss the various types of attributes with examples.

Also See: What is Database Management System

What is an Attribute and types with Examples

Lets discuss various types of attributes with their notation and examples 

Types of Attributes with Examples

  1. Single valued attributes
  2. Multi valued attributes
  3. Compound /Composite attributes
  4. Simple / Atomic attributes
  5. Stored attributes
  6. Derived attributes
  7. Complex attributes
  8. Key attributes
  9. Non key attributes
  10. Required attributes
  11. Optional/ null value attributes

The detailed explanation of all the attributes is as follows:

Also See: E-R Diagrams in DBMS: Components, Symbols, And Notations

Single Valued Attributes: It is an attribute with only one value.

  • Example: Any manufactured product can have only one serial no. , but the single valued attribute cannot be simple valued attribute because it can be subdivided. Likewise in the above example the serial no. can be subdivided on the basis of region, part no. etc.

Multi Valued Attributes: These are the attributes which can have multiple values for a single or same entity.

  • Example: Car’s colors can be divided into many colors like for roof, trim.
  • The notation for multi valued attribute is:

 

Multi value attribute notation

Fig3: Multi value attribute notation

Compound / Composite attributes: This attribute can be further divided into more attributes.

  • The notation for it is:

Compound- Composite-attribute

Fig 4: Compound / Composite attribute notation

  • Example: Entity Employee Name can be divided into sub divisions like FName, MName, LName.

Sample Compound Composite Attribute

Fig 5: Sample of compound / composite attribute

Simple / Atomic Attributes: The attributes which cannot be further divided are called as simple / atomic attributes.

  • Example: The entities like age, marital status cannot be subdivided and are simple attributes.

Also See: DBMS – RELATIONAL ALGEBRA

Stored Attributes: Attribute that cannot be derived from other attributes are called as stored attributes.

  • Example: Birth date of an employee is a stored attribute.

Derived Attributes: These attributes are derived from other attributes. It can be derived from multiple attributes and also from a separate table.

  • Example: Today’s date and age can be derived. Age can be derived by the difference between current date and date of birth.
  • The notation for the derived attribute is:

Notation of derived attribute

Fig 6: Notation of derived attribute

Also See: Various Keys in Database Management System

Complex Attributes: For an entity, if an attribute is made using the multi valued attributes and composite attributes then it is known as complex attributes.

  • Example: A person can have more than one residence; each residence can have more than one phone.

Key Attributes: This attribute represents the main characteristic of an entity i.e. primary key. Key attribute has clearly different value for each element in an entity set.

  • Example: The entity student ID is a key attribute because no other student will have the same ID.

Sample of key attribute

Fig 7: Sample of key attribute

Also See: Explain Database Scheme and Its types

Non- Key Attributes: Excluding the candidate key attributes in an entity set are the non key attributes.

  • Example: First name of a student or employee is a non-key attribute as it does not represent main characteristic of an entity.

Sample of non key attribute

Fig 8: Sample of non-key attribute

Required Attributes: Required attribute must have a data because they describe the vital part of entity.

  • Example: Taking the example of a college, there the student’s name is a vital thing.

sample of required attribute

Fig 9: sample of required attribute

Optional / Null value Attributes: It does not have a value and can be left blank, it’s optional can be filled or cannot be.

  • Example: Considering the entity student there the student’s middle name and the email ID is optional.

Sample of null attribute

Fig 10: Sample of optional / null attribute

These are different types of attributes and they all play a vital role in the database management system. Generally an oval is used to represent an attribute as shown below:

Notation of an attribute

Fig 11: Notation of an attribute

Also See: Relational Calculus in DBMS with forms Domain and Tuple

Because of their versatility they have wide applications and there are many models in which we can the attributes as explained above.

So it was all about What is an Attribute and it’s types with Examples. If you have any problem then please comment below.

What is an Attribute and 11 Types with Exampleshttps://whatisdbms.com/wp-content/uploads/2016/03/Database-Pictures.jpghttps://whatisdbms.com/wp-content/uploads/2016/03/Database-Pictures-150x150.jpgSumit ThakurWhat Is DBMSWhat is an Attribute and types with Examples: Generally attribute explains the characteristics of an entity. In database management system (DBMS) it assigns a database component or database field. Attribute stores or saves only a piece of data. For example, in an invoice the attribute may be the price...Let's Define DBMS