Name-Value Pair

From Market Ruler Help
Revision as of 05:38, 9 May 2009 by Admin (talk | contribs)
Jump to: navigation, search

A Name-Value Pair is common method of organizing information in a computer.

Typically, it is used in Internet Protocols, Cookies, Query Strings, and in many Programming Languages.

The Name portion of a Name-Value Pair is what is being described. It can also be described as a label.

The Value is the actual description.

In short, the Name gives the value its meaning.

An example will best explain Name-Value Pairs. In this case, the following describes a product using Name-Value Pairs:

Title: Hungry Dog Chow
Price: $5.99
Product Code: HDC-4453
Quantity In Stock: 23
Product URL: http://www.hungrydogchow.com/product.asp?id=451232

Now, the Names above are: Title, Price, Product Code, Quantity In Stock, Description, and Product URL.

Each of these has a value, making a pair: Hungry Dog Chow, $5.99, HDC-4453, etc.

Obviously, with the Name of Price, you know that $5.99 is how much Hungry Dog Chow costs.

The flexibility of Name-Value Pairs are the core of why they are useful when communicating on the internet.

For more information