Everipedia Logo
Everipedia is now IQ.wiki - Join the IQ Brainlist and our Discord for early access to editing on the new platform and to participate in the beta testing.
Attribute–value pair

Attribute–value pair

A name–value pair, key–value pair, field–value pair or attribute–value pair is a fundamental data representation in computing systems and applications. Designers often desire an open-ended data structure that allows for future extension without modifying existing code or data. In such situations, all or part of the data model may be expressed as a collection of 2-tuples in the form <attribute name, value> with each element being an attribute–value pair. Depending on the particular application and the implementation chosen by programmers, attribute names may or may not be unique.

Some of the applications where information is represented as attribute-value pairs are:

  • E-mail, in RFC 2822 [4] headers[1]

  • Query strings, in URLs

  • Optional elements in network protocols, such as IP, where they often appear as TLV (type-length-value) triples

  • Bibliographic information, as in BibTeX and Dublin Core metadata

  • Element attributes in SGML, HTML, and XML

  • General metadata in RDF

  • Some kinds of database systems — namely a key-value database

  • OpenStreetMap map data

  • Windows registry entries

Some computer languages implement attribute-value pairs, or more frequently collections of attribute-value pairs, as standard language features. Most of these implement the general model of an associative array: an unordered list of unique attributes with associated values. As a result, they are not fully general; they cannot be used, for example, to implement electronic mail headers (which are ordered and non-unique).

In some applications, an attribute-value pair has a value that contains a nested collection of attribute-value pairs. Some data serialization formats such as JSON support arbitrarily deep nesting.[2] Other data representations are restricted to one level of nesting, such as INI file's section/name/value.

See also

  • Attribute (computing)

  • Entity–attribute–value model

  • Query string

References

[1]
Citation Linktools.ietf.orgPeter W. Resnick. "Internet Message Format". tools.ietf.org. Retrieved 2018-10-02.
Sep 19, 2019, 12:01 PM
[2]
Citation Linkwww.w3schools.com"JSON Objects". www.w3schools.com. Retrieved 2018-10-02.
Sep 19, 2019, 12:01 PM
[3]
Citation Linktools.ietf.orgRFC 2822
Sep 19, 2019, 12:01 PM
[4]
Citation Linktools.ietf.orgRFC 2822
Sep 19, 2019, 12:01 PM
[5]
Citation Linktools.ietf.org"Internet Message Format"
Sep 19, 2019, 12:01 PM
[6]
Citation Linkwww.w3schools.com"JSON Objects"
Sep 19, 2019, 12:01 PM
[7]
Citation Linken.wikipedia.orgThe original version of this page is from Wikipedia, you can edit the page right here on Everipedia.Text is available under the Creative Commons Attribution-ShareAlike License.Additional terms may apply.See everipedia.org/everipedia-termsfor further details.Images/media credited individually (click the icon for details).
Sep 19, 2019, 12:01 PM