Database definition

What is an attribute in database systems?

What does attribute mean?

In general, an attribute is a characteristic. In a database management system (DBMS), an attribute refers to a database component, such as a table.

It can also refer to a database field. Attributes describe instances in a database column.

Techopedia explains the attribute

In relational databases, attributes are the characteristics or descriptive properties that define all items belonging to a certain category applied to all cells in a column.

Rows, instead, are called tuples and represent sets of data applied to a single feature to uniquely identify each item. Attributes are therefore the characteristics of each individual tuple that help describe its unique properties.

Think of a table in a relational database as analogous to a spreadsheet. An attribute is simply a non-null cell in the worksheet, or the conjunction of a column and a row.

It stores only one piece of data about the object represented by the table to which the attribute belongs. For example, the tuple can be an Invoice entity. Invoice attributes can be Price, Number, Date or Paid/Unpaid.

Beyond the explicit simple or single-valued attributes, there are several types of attributes available.

  • Compound attribute: is an attribute composed of several other simple attributes. For example, the Address attribute of an Employee entity can be composed of Street, City, Postal Code and Country attributes.
  • Multivalued attribute: is an attribute where multiple descriptions can be provided. For example, an Employee entity can have multiple email ID attributes in the same cell.
  • Key attribute or main attribute: is an identifier, key, letter, or number that uniquely identifies this item. For example, it can be the number of a certain invoice (for example, the individual identifier of this invoice). A table that contains only one key attribute is considered a strong entity. However, a table can contain multiple key attributes if it is derived from other tables.
  • Derived attribute: as their name suggests, they are derived from other attributes, either directly or through specific formula results. For example, an Employee’s Age attribute can be derived from the Date of Birth attribute. In other cases, a formula can calculate the VAT of a certain payment, so that each time the cell with the Payment attribute is filled, the cell with the VAT derived attribute automatically calculates its value.