Help:Portale dei vincoli di proprietà

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Help:Property constraints portal and the translation is 36% complete.

Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎català • ‎dansk • ‎français • ‎galego • ‎italiano • ‎latviešu • ‎polski • ‎português do Brasil • ‎svenska • ‎русский • ‎српски / srpski • ‎українська • ‎العربية • ‎فارسی • ‎مصرى • ‎中文 • ‎日本語
La violazione dei vincoli di proprietà di Wikidata riportata sulla pagina dell'elemento.

I vincoli di proprietà sono regole riguardanti le proprietà che specificano come esse dovrebbero essere utilizzate. Di per sè, il modello di Wikidata è molto flessibile: nulla impedisce di aggiungere all'elemento Universe (Q1) la proprietà head of government (P6). Tuttavia, un vincolo sulla proprietà può suggerire che solitamente un head of government (P6) è un uomo.

I vincoli sono suggerimenti, non ferme restrizioni, e vengono utilizzate soprattutto come un aiuto o una guida per l'utente che intende efettuare modifiche. Possono esserci delle eccezioni: per esempio, la città di Talkeetna (Q668224) ha eletto il gatto Stubbs (Q7627362) come sindaco.

Vincoli comuni

Item Pagina di aiuto Messaggio in caso di violazione
single value constraint (Q19474404) Help:Property constraints portal/Single value MediaWiki:Wbqc-violation-message-single-value
distinct values constraint (Q21502410) Help:Property constraints portal/Unique value
format constraint (Q21502404) Help:Property constraints portal/Format
type constraint (Q21503250) Help:Property constraints portal/Type
value type constraint (Q21510865) Help:Property constraints portal/Value type
multi-value constraint (Q21510857) Help:Property constraints portal/Multi value MediaWiki:wbqc-violation-message-multi-value

Tipi di vincoli ordinati alfabeticamente

Sono disponibili i seguenti tipi di vincoli:

Commons link constraint
Values for this statement should be valid links to Wikimedia Commons. Examples: image (P18) (“File” namespace), Commons category (P373) (“Category” namespace).
allowed entity types constraint
Questa proprietà dovrebbe essere usata soltanto su certi tipi di entità. Ad esempio: Wikidata property example (P1855) (proprietà).
allowed qualifiers constraint
Statements for this property should not have any qualifiers other than the listed ones. Examples: continent (P30) with qualifiers start time (P580) and end time (P582), and Freebase ID (P646) with no qualifiers at all.
allowed units constraint
Values for this statement should only use certain units (or none). Examples: term length of office (P2097) (unit: year (Q577)), population (P1082) (no units).
citation needed constraint
Statements for this property should have at least one reference. Example: properties likely to be challenged.
conflicts-with constraint
Gli elementi con questa proprietà non dovrebbero avere certe altre proprietà o dichiarazioni. Esempi: sex or gender (P21) è in conflitto con author (P50), che a sua volta è in conflitto con instance of (P31)  human (Q5).
contemporary constraint
Gli elementi con questa proprietà e i valori di questa proprietà dovrebbero coesistere in qualche momento. Esempi: mother (P25), country of citizenship (P27).
difference within range constraint
conosciuta anche come difference within range. La differenza tra i valori di questa ed un'altra proprietà dovrebbero essere compresi in un certo intervallo. Per esempio, la differenza tra date of birth (P569) e date of death (P570) dovrebbe essere compresa tra 0 e 150 anni.
distinct values
See distinct values constraint.
distinct values constraint
aka. unique value and distinct value. No two items should share a value for this property; each item’s value should be unique across all statements for this property in all of Wikidata. Almost all identifier properties have this constraint, since an identifier (ISBN, freebase ID, …) should uniquely identify an entity. Other examples include flag (P163) and anthem (P85).
format constraint
I valori di questa proprietà dovrebbero avere un certo formato. Usata spesso per gli identificatori (lungo n cifre, inizia con una certa lettera, formato da cifre, …).
integer constraint
Values for this property should be integers without decimal places.
inverse constraint
Statements using this property should always have an inverse statement. Examples: P22 (P22)/mother (P25) with child (P40).
item requires statement constraint
Gli elementi che fanno uso di questa proprietà dovrebbero avere anche altre dichiarazioni. Per esempio, gli elementi killed by (P157) dovrebbero avere place of death (P20), date of death (P570) e manner of death (P1196)  homicide (Q149086).
mandatory qualifier constraint
Le dichiarazioni per questa proprietà devono avere tutti i qualificatori elencati. Esempio: stock exchange (P414) con ticker symbol (P249) e start time (P580).
multi-value constraint
Gli elementi dovrebbero avere più di una dichiarazione per questa proprietà (o nessuna). Usato raramente, ma alcuni esempi sono cast member (P161), has tense (P3103) e has grammatical mood (P3161).
no bounds constraint
Values for this property should not use upper and lower bounds. This applies to most non-physical properties with quantity data type, for which the concept of uncertainties is not defined.
none of constraint
Values for this property should not be one of a given set of items. Example: instance of (P31) should not be woman (Q467).
one-of constraint
Values for this property should be one of a given set of items. Example: driving side (P1622) should be either left (Q13196750) or right (Q14565199).
property scope constraint
This property should only be used for certain scopes (main value of a statement, in a reference, as qualifier).
qualificatori consentiti
See allowed qualifiers constraint.
range constraint
Values for this property should be within a certain range or interval. Examples: flattening (P1102) is always between 0 and 1, and time of spacecraft launch (P619) should not be before .
single best value constraint
Items should have one “best” statement with this property. Often used for properties that can change over time: for example, cities and countries usually have a single current head of government (P6).
single value constraint
Items should have no more than one statement with this property. Often used for identifiers, but also many other properties: for example, people generally only have a single place of birth (P19) and place of death (P20).
symmetric constraint
Statements using this property should always exist in both directions. Examples: sibling (P3373), twinned administrative body (P190).
type constraint
Items with this property should have a certain type. Example: Items with date of birth (P569) should be instance of (P31) human (Q5) or animal (Q729).
unità consentite
See allowed units constraint.
value requires claim
See target required claim
value requires statement constraint
aka. target required statement. Values for this property should also have certain other statements. For example, screenwriter (P58) values should have sex or gender (P21) and occupation (P106)  screenwriter (Q28389).
value type constraint
Values for this property should have a certain type. Example: mother (P25) should be instance of (P31) human (Q5) or animal (Q729).


Several constraints have their own predefined templates and are listed at Help:Property constraints/list of constraints.

Usage instructions

Constraint reports are shown for all logged in users when they visit an entity page.

A constraint violation report displayed on an item page.

You can also check all constraints for an item on Special:ConstraintReport, and see a summary of violations across Wikidata on Wikidata:Database reports/Constraint violations.

Constraint type items

There is an item for each constraint type, e. g. type constraint (Q21503250).

Constraint statements on properties

Constraints for a property are specified as statements on the property, using property constraint (P2302) and the constraint type item. For example: sibling (P3373)property constraint (P2302)  symmetric constraint (Q21510862). Deprecated statements are ignored, so changing a constraint statement’s rank to “deprecated” is a convenient way to temporarily disable a constraint without completely removing it.

Constraint parameters

Many constraints are configurable: one of has a list of the permitted values, type contains the type, etc. These settings which configure the constraint are called parameters.

Constraint parameters are specified as qualifiers on the statement. For example:

< mother (P25) > property constraint (P2302) View with SQID < type constraint (Q21503250) View with Reasonator View with SQID >
relation (P2309) View with SQID < instance of (Q21503252) View with Reasonator View with SQID >
class (P2308) View with SQID < human (Q5) View with Reasonator View with SQID >

There are several general parameters that can be added to any constraint statement:

constraint status (P2316)
With the value mandatory constraint (Q21502408), this parameter can be used to mark a constraint as mandatory. Violations of mandatory constraints are more severe than violations of non-mandatory ones.
exception to constraint (P2303)
Lists known exceptions to the constraint. On the items listed under this parameter, the constraint is not checked.
group by (P2304)
Contains a property by the values of which constraint violations should be grouped. That is, when the database reports list violations for a constraint (for all items), the items with violations are grouped by the value they have for the property given in the group by (P2304) parameter. (The constraints extension does not use this parameter.)
constraint scope (P4680)
Specifies in which part of a statement the constraints applies, using the three special values constraint checked on main value (Q46466787), constraint checked on qualifiers (Q46466783) and constraint checked on references (Q46466805). Use any combination of these values to specify where a constraint should be checked. If the parameter is not specified, the default scope depends on the constraint type. (Note that the database reports only list violations on the main value of a statement.)

Custom constraints

With some knowledge of SPARQL one can make very complex constraints for certain properties, above and beyond the restrictions mentioned above. More information is available at Template:Complex constraint. See also the list of properties using complex constraints.