Attribute-value pair
Encyclopedia
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
Data model
A data model in software engineering is an abstract model, that documents and organizes the business data for communication between team members and is used as a plan for developing applications, specifically how data is stored and accessed....

 may be expressed as a collection of tuple
Tuple
In mathematics and computer science, a tuple is an ordered list of elements. In set theory, an n-tuple is a sequence of n elements, where n is a positive integer. There is also one 0-tuple, an empty sequence. An n-tuple is defined inductively using the construction of an ordered pair...

s <attribute name, value>; each element is 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
    E-mail
    Electronic mail, commonly known as email or e-mail, is a method of exchanging digital messages from an author to one or more recipients. Modern email operates across the Internet or other computer networks. Some early email systems required that the author and the recipient both be online at the...

    , in RFC 2822 headers
  • Optional elements in network protocols, such as IP
    Internet Protocol
    The Internet Protocol is the principal communications protocol used for relaying datagrams across an internetwork using the Internet Protocol Suite...

    , where they often appear as TLV
    Type-length-value
    Within data communication protocols, optional information may be encoded as a type-length-value or TLV element inside of the protocol. TLV is also known as tag-length value....

     (type-length-value) triples
  • Bibliographic information, as in BibTeX
    BibTeX
    BibTeX is reference management software for formatting lists of references. The BibTeX tool is typically used together with the LaTeX document preparation system...

     and Dublin Core
    Dublin Core
    The Dublin Core metadata terms are a set of vocabulary terms which can be used to describe resources for the purposes of discovery. The terms can be used to describe a full range of web resources: video, images, web pages etc and physical resources such as books and objects like artworks...

     metadata
  • Element attributes in SGML and XML
    XML
    Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

  • General metadata
    Metadata
    The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

     in RDF
    Resource Description Framework
    The Resource Description Framework is a family of World Wide Web Consortium specifications originally designed as a metadata data model...

  • Some kinds of database
    Database
    A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

     systems
  • OpenStreetMap
    OpenStreetMap
    OpenStreetMap is a collaborative project to create a free editable map of the world. Two major driving forces behind the establishment and growth of OSM have been restrictions on use or availability of map information across much of the world and the advent of inexpensive portable GPS devices.The...

     map data


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
Associative array
In computer science, an associative array is an abstract data type composed of a collection of pairs, such that each possible key appears at most once in the collection....

: 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).

See also

  • Entity-attribute-value model
    Entity-Attribute-Value model
    Entity–attribute–value model is a data model to describe entities where the number of attributes that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest. In mathematics, this model is known as a sparse matrix...

  • Query string
    Query string
    In World Wide Web, a query string is the part of a Uniform Resource Locator that contains data to be passed to web applications such as CGI programs....

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK