Help:Property constraints portal/Inverse

From Wikidata
Jump to navigation Jump to search
Translate this page;
Other languages:
Deutsch • ‎English • ‎français • ‎polski • ‎русский • ‎српски / srpski • ‎العربية

This page contains changes. Please contact a translation admin to mark them for translation.


Other languages:
Deutsch • ‎English • ‎français • ‎polski • ‎русский • ‎српски / srpski • ‎العربية
Pictogram voting two arrows to the center.svg

inverse constraint (Q21510855) specifies that a property has an inverse property, and values for the property should have a statement with the inverse property pointing back to the original item.

For example, mother (P25) has the inverse property child (P40): if the statement Jesus Christ (Q302)mother (P25)  Virgin Mary (Q345) exists, then the inverse statement Virgin Mary (Q345)child (P40)  Jesus Christ (Q302) should also exist.

If no constraint scope (P4680) is specified, this constraint is only checked on the main value of a statement. This is also the only currently supported scope.

Possible actions[edit]

There are several possible ways to address a violation of this constraint:

  • The most likely case is that the inverse statement should be added to the other item, where it is missing. As there may be many such cases, a frequent approach is to do this by bot.
  • It’s possible that the current item should not have the statement at all, and that the statement should be removed.
  • It’s possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.

Parameters[edit]

This constraint has one mandatory parameter:

property (P2306)
Contains the inverse property. Must contain exactly one property (no value Help or unknown value Help is not permitted).

Example[edit]

Example setting for mother (P25).

property constraint
Normal rank inverse constraint Arbcom ru editing.svg edit
property child
▼ 0 reference
+ add reference
+ add value

Template[edit]

When the constraint is set to the property, the following template is automatically displayed in the property talk page. The template is created by Module:Constraints using Template:Constraint, invoked from Template:Property documentation. Translations are defined at Module:i18n/constraints.

Inverse property of “child (P40):
if [item A] has this property (mother (P25)) linked to [item B],
then [item B] should also have property “child (P40)” linked to [item A]. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P25#Inverse, SPARQL, SPARQL (new)

Lists[edit]

Lists of properties which are set inverse constraint.