Term of the Day

The Sinclair ZX Spectrum was a considerably popular personal computer during the 1980s. Developed in Britain, it is often credited for popularizing use of the personal computer in Europe. It featured a screen resolution of 256 by 192 colored pixels (unprecedented at the time for a household computer). It was also known for its multifunction rubber...
Read more

IT Business

Attribute-Value Pair (AVP)

Definition - What does Attribute-Value Pair (AVP) mean?

An attribute-value pair (AVP) is a fundamental representation of data in computer systems and its various applications. The attribute-value pair is a good way of storing and modeling real-world data in a database. A good example of this is how personal data such as a name is stored, by using an attribute called "first name" followed by its value pair, which is the actual first name of the person.

An attribute-value pair is also known as a name-value pair, key-value pair or field-value pair.

Techopedia explains Attribute-Value Pair (AVP)

Attribute-value pairs can be found in any computer system, and they are found behind a lot of common functionalities. A good example is any sort of login credential having a username and a password. The "username" and "password" are considered as the attribute that points to the actual values for that account, and the actual username and password are the "values" of those attributes. These attributes simply give data meaning, without it, it would simply be a number, word or combination of both, but would hardly have any meaning.

Because of the concept of giving context to data, this representation is most often employed in databases. It is used when the number of columns is large or number of columns is unknown or very dynamic. This is because column headers cannot be concretely defined because of the difference in data context. But using this in a database also has a downside, for it is harder to query and even define constraints and enforce them.

Although not really considered as such, the concept of the attribute-value pair is pervasive in programming languages themselves, for you cannot have a variable without a corresponding value. The variable is the attribute and whatever it contains or points to is the value.