Jump to content

Name–value pair: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
mNo edit summary
m References
Line 1: Line 1:
{{Unreferenced|date=December 2009}}
{{more references|date=December 2009}}
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 [[forward compatibility | 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 [[tuple|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.
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 [[forward compatibility | 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 [[tuple|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.


Line 25: Line 25:


==References==
==References==
<references />

{{DEFAULTSORT:Attribute-Value Pair}}
{{DEFAULTSORT:Attribute-Value Pair}}
[[Category:Data modeling]]
[[Category:Data modeling]]

Revision as of 10:38, 14 October 2018

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:

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

References

  1. ^ Peter W. Resnick. "Internet Message Format". tools.ietf.org. Retrieved 2018-10-02. {{cite web}}: Cite has empty unknown parameter: |dead-url= (help)
  2. ^ "JSON Objects". www.w3schools.com. Retrieved 2018-10-02.