what is an attribute in database?

What is an attribute in database?

Normally, we considered an attribute as a property or characteristic. In a database management system (DBMS), an attribute represents the column of a table. An attribute can have value inside it.

What is the meaning of attribute-value?

Any data stored in attribute is considered as an attribute value.

For example, in the given table, student is the table, and marks is the attribute and 88 is the attribute value.

Student_Name Sudent_RollNo Sudent_Marks
Ali T4Tutorials-001 88
Akram T4Tutorials-002 70
Asad T4Tutorials-003 55

 

An attribute can be considered as a database field.

What are prime attributes?

Attributes of the database tables which are candidate keys of the database tables are called prime attributes.

Example of prime attributes

In the given table, Sudent_Name and Sudent_RollNo are the prime attribute.

What are non prime attributes?

Attributes of the database tables which are not candidate keys of the database tables are called non prime attributes.

Example of non prime attributes

In the given table, Sudent_Marks is the non prime attribute.

Note: Prime attributes are also called key attributes and similarly non prime attributes are also called non key attributes

 

Types of attributes

There are many types of attributes. Some of these are mentioned below;

Composite attribute:

Composite attribute is an attribute combined of many other simple attributes. For example, the marks attribute of a student entity can be a combination or composition of the Street, City, Province and Country attributes.

Multi valued attribute:

Multi valued attribute is an attribute where more than one description can be provided. For example, a student entity may have more than one hobby attributes in the same cell.

Key attribute or primary attribute:

Key attribute or primary attribute are the attributes that can uniquely identify a row/ record/ tuple in the relation or table. A table that contains a single attribute as a key attribute is known as a strong entity.

Note: a table may contain more than one key attribute if the table is derived from other tables in the database.

Derived attribute:

Derived attribute can be derived from other attributes. For example, the Age attribute of a STUDENT can be derived from the Date of Birth attribute.

 

What is an attribute in database?

Normally, we considered an attribute as a property or characteristic. In a database management system (DBMS), an attribute represents the column of a table. An attribute can have value inside it.

What is the meaning of attribute-value?

Any data stored in attribute is considered as an attribute value.

For example, in the given table, student is the table, and marks is the attribute and 88 is the attribute value.

Student_Name Sudent_RollNo Sudent_Marks
Ali T4Tutorials-001 88
Akram T4Tutorials-002 70
Asad T4Tutorials-003 55

 

An attribute can be considered as a database field.

What are prime attributes?

Attributes of the database tables which are candidate keys of the database tables are called prime attributes.

Example of prime attributes

In the given table, Sudent_Name and Sudent_RollNo are the prime attribute.

What are non prime attributes?

Attributes of the database tables which are not candidate keys of the database tables are called non prime attributes.

Example of non prime attributes

In the given table, Sudent_Marks is the non prime attribute.

Note: Prime attributes are also called key attributes and similarly non prime attributes are also called non key attributes

 

Types of attributes

There are many types of attributes. Some of these are mentioned below;

Composite attribute:

Composite attribute is an attribute combined of many other simple attributes. For example, the marks attribute of a student entity can be a combination or composition of the Street, City, Province and Country attributes.

Multi valued attribute:

Multi valued attribute is an attribute where more than one description can be provided. For example, a student entity may have more than one hobby attributes in the same cell.

Key attribute or primary attribute:

Key attribute or primary attribute are the attributes that can uniquely identify a row/ record/ tuple in the relation or table. A table that contains a single attribute as a key attribute is known as a strong entity.

Note: a table may contain more than one key attribute if the table is derived from other tables in the database.

Derived attribute:

Derived attribute can be derived from other attributes. For example, the Age attribute of a STUDENT can be derived from the Date of Birth attribute.

Add a Comment