Help talk:Property constraints portal/Mandatory qualifiers

From Wikidata
Jump to navigation Jump to search

Modeling of multiple qualifiers in constraint statements[edit]

How do we model a constraint with multiple mandatory qualifiers, e. g. “stock exchange (P414) must have both ticker symbol (P249) and start time (P580)”, in constraint statements? I see two possibilities:

  • One statement:
  • Two statements:

If we choose the second one, then we can instead interpret the first statement as “stock exchange (P414) must have at least one of ticker symbol (P249) and start time (P580)”. This would increase the expressive power of the constraint type, but at the cost of making it potentially more confusing: I suspect that the first possibility is the more natural one.

(I’m not sure who to ping for this discussion, but I think at least JakobVoss (talkcontribslogs), Ivan A. Krestinin (talkcontribslogs) and Jonas Kress (WMDE) (talkcontribslogs) could be interested – feel free to include more.)

--Lucas Werkmeister (WMDE) (talk) 20:45, 19 May 2017 (UTC)

  • "One statement" possibility does not allow to mark one constraint as "mandatory" and another as usual constraint. It is detected as error by Module:Constraints. — Ivan A. Krestinin (talk) 21:09, 19 May 2017 (UTC)
    • Your remark about “mandatory” is a very good point, thanks.
Just to make sure I’m understanding you correctly – your module reports an error if a property constraint (P2302)  mandatory qualifier constraint (Q21510856) statement has more than one property (P2306) qualifier? --Lucas Werkmeister (WMDE) (talk) 21:34, 19 May 2017 (UTC)
  • Okay, that’s good to know, then we’ll do the same in the QualityConstraints extension for now, and if we ever need “must have either qualifier 1 or qualifier 2” we can revisit this. Thanks! --Lucas Werkmeister (WMDE) (talk) 08:27, 20 May 2017 (UTC)