Latest comment: 5 years ago by ArthurPSmith in topic Time & dates

Home >


General >


Wikipedia and Wikimedia concepts >


Arts >


Other domains >


See Help:Modelling/Home for notation, intended audience.

General edit

Items and properties edit

In Wikidata, items are used to represent all the things in human knowledge, including topics, concepts, and objects. For example, the 1988 Summer Olympics (Q8470), love (Q316), Elvis Presley (Q303), and Gorilla (Q36611) are all items in Wikidata.

An item has a label and description (each in any number of languages) and can sitelink to equivalent entries on sister Wikimedia projects (most notably, to Wikipedia articles), but most of its content comes in the form of properties, each of which has a value, which may in turn be an item, or it may be (for example) a number, string, or date. Properties (as against property-value pairs) are similar to items, but:

  1. Properties do not have a section on their pages for sitelinks to other Wikimedia projects.
  2. Properties do not have identifiers for use on external websites.
  3. Only a limited group of users have permission to create new properties.

Typically, a Wikidata property defines a class of items that are possible values of the the property (the "domain" of the property). This is specified via the property's subject type constraint (Q21503250). See Help:Property constraints portal/Type. Properties may also be constrained in many other ways: for a more general discussion of constraints, Help:Property constraints portal.

Item-valued properties can similarly define the type of items that are possible values of the the property (the "range" of the property). This is specified via the property's value-type constraint (Q21510865). See Help:Property constraints portal/Value type.

A Wikidata item may have an closely related property; for example:

People experienced in relational databases may find it useful to imagine that any given property corresponds to a particular relation whose elements (columns) are (1) the item that has the property and (2) the value of the property. If the property is consistently single-valued, then the item that has the property is a candidate key. Otherwise, a candidate key is (item, value). Qualifiers and references are each (loosely) like additional pairs of columns: loosely, because qualifiers and references may themselves be multi-valued.

Inverse properties edit

People experienced in normalized relational databases may be surprised that in many cases, Wikidata encourages or even mandates that a relationship be explicitly expressed in both directions, using two properties that are mutually related by inverse property (P1696). For example:

In Wikidata, it would be common and expected that if, for example…

⟨ A ⟩ student (P802)   ⟨ B ⟩


⟨ B ⟩ student of (P1066)   ⟨ A ⟩

…with each statements made explicitly on the page for the first item in the statement.

Symmetric properties are necessarily (and implicitly) their own inverse:

So, for example…

Similar items or potentially confused items edit

The following properties may be useful:

Relation to sister projects edit

See also Help:Modelling/Wikipedia and Wikimedia concepts.

Among other things, a Wikidata item is the hub to maintain identity of an item across sister projects such as the various language Wikipedias.

Via sitelinks edit

Most relations of an item to a sister project are expressed by the sitelinks (shown at the bottom of the Wikidata page).

For example, consider France (Q142). Sitelinks connect this to:

... but also to such things as ...

Via properties edit

In addition, there are a few additional links via properties. The following is intended to be illustrative, rather than exhaustive.

Classification of individual objects edit

Classification links an instance/example/case of an object of some class/kind/type to one or several general classes of objects of the same kind, that is to say other instances of this class in Wikidata. All objects in a class share some properties, which define the class.

Note the distinction between a class and an instance: an instance is a specific thing; a class is a type of thing:

Every item (more precisely the concept or object it represents) should be classified using Help:basic membership properties. Successive levels of classification effectively form a hierarchy of levels of abstraction. instance of (P31) is the basic property for linking instances to classes. For example, we could have

which states that USS Alabama is a submarine and that all submarines are watercraft.

However, besides the instance of (P31) and the class/instance relationship, Wikidata supports a number of more specialized classification systems (specific to a domain of application). For example, the relationship just indicated can be more specifically expressed by

While the former is not exactly wrong, the latter conveys more precise information.

Here are some more examples of specializations of the class/instance relationship:

see also the related sections in this document

When a hierarchy of classes is available, classify an item only with the most specific class or classes it belongs to. For example, it would be technically true in modeling Sun (Q525) to have both of the following:

However, every star is an astronomical body. At the risk of getting ahead of ourselves, we can represent that fact by:

So, once we have Statement 1, there is no need to make Statement 2 explicit because it follows logically.

The above is just for the purpose of a clear example. In fact, we have the much more specific:

G-type main-sequence star (Q5864) and Population I star (Q3592493) are both indirect subclasses of star (Q523).

A corollary to this is that you shouldn't create classes that mix different things together. For example, instead of saying statue of Christ the King (Q19353400) (a particular statue in Hintham in the Netherlands) is an instance of Statues of Christ the King (nonexistent Q-code), we would say

subproperty of (P1647) expresses a relation between properties analogous to instance of (P31) for a relation between categories.

Hierarchy of classes edit

'subclass of (P279)' is used to link each class to larger more general classes to form a hierarchy of classes.

There is a consensus on Wikidata against creating other properties which perform this subclassing function, as it is felt a clean hierarchy of classes is in keeping with W3C recommendations and will make it easier to use the data here. This is in contrast to instance of (P31) where, as remarked, there are often more specific alternatives to simply saying something is an instance of a class.


⟨ class X ⟩ subclass of (P279)   ⟨ class Y ⟩

then every member of (instance of) X is also a member of (instance of) Y but Y may have other members which are not members of X. Y is more general than X.

Examples edit

Groups of objects or people edit

First, some context: some classes, represent objects or groups or that are made of smaller objects. For example:

Property part of (P361)   is used to link an instance of an individual object to an instance of a group that contains the first object. It is not used to link to a class. The inverse of the part of (P361) property is has part(s) (P527)  . So, for example, extending on musical group (Q215380) immediately above:

part of (P361) can be used to create a hierarchy of ever larger objects: A ship is part of a task force is part of a fleet is part of a navy is part of the armed forces.

Other similar properties include more specific refinements of part of (P361); only a few of these can be used recursively to make a hierarchy:

Property Notes Example
located in the administrative territorial entity (P131) Indicates that a territorial entity is part of a larger, containing territorial entity. This can be used recursively to make a hierarchy.
league (P118) Indicates that a team is part of a league.
member of political party (P102) This can be used to indicate that a person belongs to/is part of a political party.
ethnic group (P172) Indicates that a person belongs to/is part of an ethnic group. However, this should be used with great caution. Consensus is that a VERY high standard of proof is needed for this field to be used for a person. In general this means 1) the subject claims it themself, or 2) it is widely agreed on by scholars, or 3) is fictional and portrayed as such.
member of (P463) Indicates membership in organization or club. Do not use this property for membership in ethnic or social groups, nor for holding a position such as a member of parliament (use position held (P39) for that).
minor planet group (P196) Indicates that a particular minor planet is part of a group.

Relationship in physical space edit

Sometimes the relationship of two entities in physical space can be represented by a property, even when one is not part of the other:

Property Notes Example
underlies (P567) In geology, a stratigraphic unit that is physically above this one. This can form a hierarchy, but it is not a "part-of" hierarchy.
overlies (P568) In geology, a stratigraphic unit that is physically below this one. This is the reciprocal of underlies (P567). This can form a hierarchy, but it is not a "part-of" hierarchy.

In other contexts, a spatial relationship is better expressed by a qualifier, such as:

Authorship edit

Every human-made thing has an author, a builder, etc. Currently there are a lot of distinct properties to express authorship. The most general is creator (P170); many of others have one of the following:

In turn:

This means we have the following hierarchy:

Per a 2013 remark by User:Pichpich it's useful to have this kind of detail for queries, but there might be an advantage to have these all inherit via subproperty of (P1647) from creator (P170).

Potential qualifiers for authorship edit

Time & dates edit

The following is a "nutshell" description of times and dates as a datatype; Help:Dates also discusses how to enter dates.

There is a distinct property day in year for periodic occurrence (P837) for recurring dates, for example as a value for property birthday (P3150); there are also some very special cases such as Easter-related dates.

Items which change over time edit

For example for organizations and corporations, buildings, products, etc. The creation or first known existence of the item should be indicated with inception (P571) (similar to birth date for a person). For a property that has changed at a certain time (for example official name (P1448)), the end time (P582) qualifier should be used on the old value, and the new value should have the same or subsequent start time (P580); if there are multiple values, the current value should be ranked as preferred. On occasion the changes to such an item may be sufficient to warrant creation of a new item, particularly in the case of corporate mergers or splits where two items become one (or the reverse). The event itself may warrant its own item, particularly if notable enough to have significant media coverage. The replaces (P1365) and replaced by (P1366) properties should be used to link the old and new items. ArthurPSmith (talk) 13:56, 25 May 2018 (UTC)Reply[reply]

Series and sequences edit

Properties edit

  • part of (P361) Each member of a sequence or series can use this to link to the item for the whole sequence or series.
  • follows (P155) Each member of a sequence or series can use this to link to the item that comes before the current item. The first member has no value for this property.
    • Apparently, some Projects on Wikidata have a standard of omitting P155 for the first item, rather than have an explicit no value.
  • followed by (P156) Each member of a sequence or series can use this to link to the item that comes after the current item. The last member has no value for this property.
    • Apparently, some Projects on Wikidata have a standard of omitting P156 for the last item, rather than have an explicit no value.
  • In addition, you can use series ordinal (P1545).

If the current item is part of 2 different series or sequences then P361 should have 2 values - one for each sequence - and P155 and P156 should be used a qualifiers to these values rather than as standalone statements.

Examples edit

Star Wars: Episode IV – A New Hope (Q17738):

Star Wars: Episode IV – A New Hope (Q17738):

Colors edit

The subclass of (P279) relation can be used to relate a narrower group of colors to a broader group, for example:

The broadest color groups (primary colors, rainbow colors, or colors like gray or brown) don't have a "parent" in the same sense, and can be just subclassed to entity (Q35120). All color items should be instance of (P31) color (Q1075).

Events and their causes edit

Causality chains edit

Recurring events edit

For events that happen periodically.