Code (metadata)

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In metadata, the representation term code refers to, and is used in the name of, data elements whose allowable values can be represented as enumerated lists. Each enumerated value is a string that for brevity represents a specific meaning. For example, for a PersonGenderCode the allowable code valid values might be "male", "female" or "unknown". To be compliant with ISO standards a value meaning or definition must also be associated with each code.

The ISO/IEC 11179 metadata registry standard defines code as a system of valid symbols that substitute for longer values. In general, if the number of codes is small the list of valid codes and their definitions can be transmitted with a document that validates the data. Codes usually have a symbolic meaning that can be understood by a person.

One example code is a set of two letter state codes used in a US postal address. The code MN represents the state of Minnesota. Its equivalent ID using FIPS standards is the number 27. The number 27 would be classified as having a representation term of type Identifier and have the representation suffix of ID.

Another example is the three-letter international airport codes such as 'MSP' for the Minneapolis-St. Paul Airport. Although people use these codes to identify an airport, they would be classified as having a representation term of Code because they contain mnemonic information.

Sometimes identification systems are also called "codes" in common every-day language. For example people frequently refer to a location's "zip code". Because of the lack of symbolic meaning in a numeric value, zip codes would technically be classified under ISO guidelines as an identifier. For example in the NIEM and GJXDM standards a zip code is called LocationPostalCodeID. The concept is Location, the property is PostalCode and the representation term is ID.

It is sometimes difficult to determine if a data element is a code or an identifier. In general identifiers are sequential numbers used to identify a specific item in an identification scheme. If a data element has mnemonic information it is generally classified as a code.

If only two code values are needed, an indicator (Boolean true/false) representation term can be used.

See also[edit]