Difference between revisions of "Key-value pair"

From PKC
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[wikipedia:Key-value pair|Key-value pair]] is a fundamental data type, which only specifies a relationship between a '''name''' or '''key''' with a '''value'''. It can be thought of as a kind of [[hashtable]] or [[dictionary]] data type, and can be used to implement [[S-expression]]s. The ultimate [[meta-language]] [[Backus-Naur form]] is basically a collection of [[key=value pair]]s.
[[wikipedia:Key-value pair|Key-value pair]] is a fundamental data type, which only specifies a relationship between a '''name''' or '''key''' with a '''value'''. It can be thought of as a kind of [[hashtable]] or [[dictionary]] data type, and can be used to implement [[S-expression]]s. The ultimate [[meta language]] [[Backus-Naur form]] is basically a collection of [[key-value pair]]s.


A collection of [[key=value pair]]s can also be considered as a lookup table or a [[dictionary]] data type, the description of [[key-value pair]]'s plural form is described as follows: {{:Key-value pairs}}.  
A collection of [[key-value pair]]s can also be considered as a lookup table or a [[dictionary]] data type.  


It is known that [[ordered pair]]s of data was used to construct [[matrix algebra]]<ref>{{:Paper/Accounting Games}}</ref>.  
It is known that [[ordered pair]]s of data was used to construct [[matrix algebra]]<ref>{{:Paper/Accounting Games}}</ref>.  


==Industry Examples of Nested Key-value pairs==
==Industry Examples of Nested Key-value pairs==
The [[yaml]], Yet Another Markup Language, is a typical realization of denoting key-value pairs in a highly popular language in the world of [[Infrastructure as code]]. [[JSON]], the JavaScript Serial Object Notation, is another kind of nested key-value pairs. [[JSON]]'s expressiveness is basically equivalent to [[yaml]].
The [[yaml]], Yet Another Markup Language, is a typical realization of denoting key-value pairs in a highly popular language in the world of [[Infrastructure as code]]. [[JSON]], the JavaScript Serial Object Notation, is another kind of nested key-value pairs. [[JSON]]'s expressiveness is basically equivalent to [[YAML]].




Line 14: Line 14:
===Associative Array===
===Associative Array===
[[Associative array]] is a kind of [[table]], like [[Table]] in [[Lua]], which is stored as a set of [[key-value pair]]s.
[[Associative array]] is a kind of [[table]], like [[Table]] in [[Lua]], which is stored as a set of [[key-value pair]]s.
===Key Pair is a special kind of key-value pair===
The term [[key pair]] has special meaning in the context of cryptography. The key in [[key pair]] is the special data piece, whether it is a file, a string, or any other piece of data, that gets mapped onto another value using a [[hash function]], so that if the key is slightly changed, the value of [[key pair]] will almost always change. See the following video: [[Video/Key Pair - ETH.BUILD|Key Pair - ETH.BUILD]]<ref>{{:Video/Key Pair - ETH.BUILD}}</ref> to learn about [[key pair]].





Latest revision as of 16:10, 22 May 2022

Key-value pair is a fundamental data type, which only specifies a relationship between a name or key with a value. It can be thought of as a kind of hashtable or dictionary data type, and can be used to implement S-expressions. The ultimate meta language Backus-Naur form is basically a collection of key-value pairs.

A collection of key-value pairs can also be considered as a lookup table or a dictionary data type.

It is known that ordered pairs of data was used to construct matrix algebra[1].

Industry Examples of Nested Key-value pairs

The yaml, Yet Another Markup Language, is a typical realization of denoting key-value pairs in a highly popular language in the world of Infrastructure as code. JSON, the JavaScript Serial Object Notation, is another kind of nested key-value pairs. JSON's expressiveness is basically equivalent to YAML.


Backus-Naur Form

Backus-Naur Form(Q211577), often abbreviated as BNF, is one of the two main notation techniques for context-free grammars in computer science.

BNF is a formal language that can be denoted in a collection of key-value pairs. For instance:

  <symbol> ::= __expression__

In the example shown above, <symbol> denotes a key, and __expression__ denotes a value.

  • <symbol>is a nonterminal (variable) and the __expression__ consists of one or more sequences of either terminal or nonterminal symbols;
  • =::= means that the symbol on the left must be replaced with the expression on the right.
  • more sequences of symbols are separated by the vertical bar "|", indicating an alternation choice, the whole being a possible substitution for the symbol on the left.

Symbols that never appear on a left side are terminals. On the other hand, symbols that appear on a left side are non-terminals and are always enclosed between the pair <>.



Associative Array

Associative array is a kind of table, like Table in Lua, which is stored as a set of key-value pairs.

Key Pair is a special kind of key-value pair

The term key pair has special meaning in the context of cryptography. The key in key pair is the special data piece, whether it is a file, a string, or any other piece of data, that gets mapped onto another value using a hash function, so that if the key is slightly changed, the value of key pair will almost always change. See the following video: Key Pair - ETH.BUILD[2] to learn about key pair.



References

  1. Vysotskaya, Anna (July 24, 2018). "Accounting Games: Using Matrix Algebra in Creating the Accounting Models". local page: Mathematics. 
  2. Griffith, Austin (Oct 26, 2019). Key Pair - ETH.BUILD. local page: Austin Griffith. 

Related Pages