Help:Ограничения свойств/Уникальное значение
This is the documentation page for a particular constraint type. See Help:Property constraints portal for a general overview of property constraints. |
Ограничение «distinct-values constraint (Q21502410)» определяет, что значения для этого свойства должны быть уникальными в рамках Викиданных и никакой иной элемент не должен иметь такого же значения в утверждении, содержащем это свойство.
Почти все свойства-идентификаторы имеют такое ограничение, так как ISBN-13 (P212) или Freebase ID (P646) должен однозначно идентифицировать сущность. Другим примерами служат flag (P163) и anthem (P85).
Свойства с этим ограничеснием обычно также имеют single-value constraint (Q19474404).
Если constraint scope (P4680) не определена, это ограничение проверяется только для основного значения элемента.
A qualifier can be defined as separator (P4155). This allows the same value on multiple entities as long as the separator qualifier is different.
Возможные действия
На нарушение этого ограничения можно реагировать одним из следующих способов:
- Возможно, конфликтующие элементы являются дубликатами и должны быть объединены.
- Возможно, в одном из конфликтующих элементов значение свойства ошибочно (например, опечатка, случайно перепутаны цифры и т.д.) и должно быть исправлено.
- It is possible that a separator (P4155) (or several of them) should be defined for the constraint, to declare that multiple items sharing a value are acceptable as long as they have certain different qualifiers.
- Возможно, конфликтующие элементы служат редким, но законным исключением из ограничения, и ничего не следует делать.
Параметры
This constraint has one optional parameter:
- separator (P4155): Contains the separators. May contain one or more properties. If specified, multiple statements with the same value do not constitute a violation of this constraint as long as they have different qualifiers for the properties specified here.
Example
property constraint |
| ||||||||||
add value |
Template
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.
List of violations of this constraint: Database reports/Constraint violations/P236#Unique value, SPARQL (every item), SPARQL (by value)
Exceptions
Cases where uniqueness should or could be evaluated differently and ways to handle such exceptions:
- list exceptions as such on property constraints: available [1]
- indicate that an identifier is shared with another item: not available [2]
- indicate that an identifier was reassigned: not available
- distinct best value constraint: not available [3]
- distinct case insensitive: not available, handling attempted by normalizing values [4]
- distinct value including uses in references: available [5]
- define uniqueness per namespace: not available [6]
- define uniqueness per entity type (e.g. lexeme and item): not available
Lists
Lists of properties which are set distinct values constraint.
- Category:Properties with single value constraints
- SPARQL query - click the execute button at the linked page to see the query result.
Notes
- ↑ Help:Property_constraints_portal#Constraint_parameters → exception to constraint (P2303)
- ↑ Help_talk:Property_constraints_portal/Archive_1#separator_for_distinct_values_constraint
- ↑ Wikidata_talk:WikiProject_property_constraints/Archive_2#Distinct_best_value_constraint
- ↑ Wikidata_talk:WikiProject_property_constraints/Archive_2#Distinct_case-insensitive_values
- ↑ Help:Property_constraints_portal#Constraint_parameters → constraint scope (P4680)
- ↑ Help talk:Property constraints portal/Unique value#Unique value per namespace