|Holds compound property values that consist of a short list of values with fixed type and order|
|Provided by:||Semantic MediaWiki|
|Until version:||still in use|
|In this wiki:||Record|
|Table of Contents|
The datatype record is used for property values that consist of a short list of values of other datatypes. For each property that uses this datatype, the order and type of the individual fields of the record is fixed, based on a declaration with special property "Has fields"Defines a short list of fields with a fixed type and order for datatype Record on the property page. Individual fields in a record value are separated with semicolons (
In earlier versions of Semantic MediaWiki, record properties have also been called many-valued properties or n-ary properties.
Declaration and usage
A record property is declared by annotating the respective property page with 2 special properties:
[[Has type::Record]], and
- a single1 annotation of
[[Has fields::<field-1>;...]]listing the record's fields separated by semicolons (
;), where each field is the name of another property - you must not have any two fields refer to the same property.
Defining and using a record
- Defining a record describes how record types are to be defined
- Show examples on how to use a record
- Contains examples on how to search a record
- Discuses the alternative by using subobjects
- You cannot set the layout of the values; they will always appear as a comma-separated list.
- Fields of records cannot be the basis for special purpose query formats such as result format "Timeline"Displays query results in interactive timelines or geography related result formats, etc.
A record is stored internally as subobject (given its n-ary characteristics) hereby is represented by its own entity space, yet is tightly coupled to the embedding subject. Furthermore, if a record is defined by something like
[[Has fields::Has foo;Has bar]] and a query contains a condition to
[[Has foo::+]] then the result set will match the "native" record representation (meaning the subobject not the formatted record).
With "native" record representation2 we refer to a subobject with an anonymous identifier identifiable by
_#... as part of the entity (subject, page) name.