See Help:Modelling/Home for notation, intended audience.
Items and propertiesEdit
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:
- Properties do not have a section on their pages for sitelinks to other Wikimedia projects.
- Properties do not have identifiers for use on external websites.
- 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 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.
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…
…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 itemsEdit
The following properties may be useful:
- partially coincident with (P1382) for overlapping concepts, territories, etc.
- said to be the same as (P460) for items some sources distinguish, and others say are the same thing.
- different from (P1889) for items that are different, but could be confused.
Relation to sister projectsEdit
Among other things, a Wikidata item is the hub to maintain identity of an item across sister projects such as the various language Wikipedias.
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:
- en:France in the English-language Wikipedia
- fr:France in the French-language Wikipedia
- ru:Франция in the French-language Wikipedia
... but also to such things as ...
- https://en.wikinews.org/wiki/Category:France (English-language Wikinews)
- https://pl.wikiquote.org/wiki/Francja (Polish-language Wikiquote)
- commons:France Wikimedia Commons' gallery page on France
In addition, there are a few additional links via properties. The following is intended to be illustrative, rather than exhaustive.
- In Commons, Categories are much more important than in other sister projects, so we distinguish:
- For Wikisource, we can have Wikisource index page (P1957):
- Also, within Wikidata itself, but with important implications for sister projects:
- One or more projects has a "portal" for this item, so we have:
- One or more projects (besides Commons) has a category corresponding to this item, so we have:
- There are quite a few other similar relations, including but not limited to:
- One or more projects has a "portal" for this item, so we have:
Classification of individual objectsEdit
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:
- Istanbul (Q406) and Berlin (Q64) are both instances of the class big city (Q1549591).
- Tenjukoku Shūchō Mandala (Q11442553) and Bayeux Tapestry (Q187483) are both instances of the class embroidery (Q28966302).
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:
- taxon rank (P105)
- galaxy morphological type (P223)
- type of orbit (P522)
- spectral class (P215)
- asteroid spectral type (P720)
- occupation (P106)
- crystal system (P556)
- vessel class (P289)
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 Sol (Q525) to have both of the following:
- Statement 1:
- Statement 2:
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:
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
Hierarchy of classesEdit
'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.
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.
Groups of objects or peopleEdit
First, some context: some classes, represent objects or groups or that are made of smaller objects. For example:
- A hill group (Q19850234) is made of hills. It is a subclass of both group (Q16887380) and geographical feature (Q618123):
- Similarly, musical group (Q215380) is a subclass of both musical ensemble (Q2088357) and group of humans (Q16334295):
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 (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:
|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 spaceEdit
Sometimes the relationship of two entities in physical space can be represented by a property, even when one is not part of the other:
|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:
- direction (P560) (example values: the cardinal directions north (Q659), south (Q667), east (Q684), west (Q679))
- towards (P5051), giving the terminus of a railroad line (or similar route) as a qualifier for adjacent station (P197) (direction in a different sense of the word).
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:
This means we have the following hierarchy:
- creator (P170)
- As of 2018-05-22, the following do not have property subproperty of (P1647), but we could choose to have all of them inherit from creator (P170).
- taxon author (P405) could have
- performer (P175) could have
- translator (P655) could have
- structural engineer (P631) could have
Time & datesEdit
The following is a "nutshell" description of times and dates as a datatype; Help:Dates also discusses how to enter dates.
- Each given date/time value has a precision: e.g. it may be accurate to the day, the year, the decade, the millennium, etc. Although in theory our date/time datatype can express a time accurate to one second, in practice as of 2018-05 we use it only as a date, and do not store values more precise than a day.
- This date/time datatype is used for properties including but not limited to date of birth (P569), date of death (P570), inception (P571), time of discovery or invention (P575), publication date (P577), and date depicted (P2913).
- Rather than just a single date for a property, we can also use qualifiers such as earliest date (P1319), latest date (P1326), start time (P580), end time (P582) and others, each of which can take a separate date/time value.
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 timeEdit
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)
Series and sequencesEdit
- 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.
- is part of the series Star Wars (Q22092344) (the Star Wars saga in chronological order in the Star Wars universe): Star Wars: Episode IV – A New Hope (Q17738)
- It follows Star Wars: Episode III – Revenge of the Sith (Q42051):
- It is is followed by Star Wars: Episode V – The Empire Strikes Back (Q181795):
- Necessarily, Star Wars: Episode III – Revenge of the Sith (Q42051) and Star Wars: Episode V – The Empire Strikes Back (Q181795) are also part of the series Star Wars (Q22092344).
- is part of the series Star Wars Trilogy (Q25540859):
- It is the start of the series:
- It is followed by Star Wars: Episode V – The Empire Strikes Back (Q181795):
- Necessarily, Star Wars: Episode V – The Empire Strikes Back (Q181795) is also part of the series Star Wars Trilogy (Q25540859).
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).