Help:Ограничения свойств/Уникальное значение

This page is a translated version of the page Help:Property constraints portal/Unique value and the translation is 32% complete.
Outdated translations are marked like this.

Ограничение «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
  distinct-values constraint
0 references
add reference


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.

Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
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.

Notes