Property talk:P25: Difference between revisions

From Wikidata
Jump to navigation Jump to search
Content deleted Content added
Srittau (talk | contribs)
No edit summary
add complex constraint
Line 27: Line 27:
{{Constraint:Qualifiers|list={{P|805}}<!-- is used in Q302 -->,{{P|794}},{{P|1039}}|mandatory=true}}
{{Constraint:Qualifiers|list={{P|805}}<!-- is used in Q302 -->,{{P|794}},{{P|1039}}|mandatory=true}}
{{Constraint:Value only}}
{{Constraint:Value only}}
{{Complex constraint
|label=Mother didn't live during the same time as her child
|description=death date of person A is before birth date of person B
|sparql=SELECT * { {SELECT ?item WHERE { ?item wdt:P25 ?item2 . ?item p:P569/psv:P569 ?birth1_node . ?birth1_node wikibase:timeValue ?birth1 . ?birth1_node wikibase:timePrecision "11"^^xsd:integer . ?item2 p:P570/psv:P570 ?death2_node . ?death2_node wikibase:timeValue ?death2 . ?death2_node wikibase:timePrecision "11"^^xsd:integer . FILTER (?birth1 > ?death2) } } UNION {SELECT ?item WHERE { ?item wdt:P25 ?item2 . ?item p:P570/psv:P570 ?death1_node . ?death1_node wikibase:timeValue ?death1 . ?death1_node wikibase:timePrecision "11"^^xsd:integer . ?item2 p:P569/psv:P569 ?birth2_node . ?birth2_node wikibase:timeValue ?birth2 . ?birth2_node wikibase:timePrecision "11"^^xsd:integer . FILTER (?birth2 > ?death1)} } }
}}



{{ExternalUse|
{{ExternalUse|

Revision as of 22:13, 29 January 2016

Documentation

Please remove the following deprecated parameters: proposed by.

mother
female parent of the subject. For stepmother, use "stepparent" (P3448)
Representsmother (Q7560)
Data typeItem
Template parameter"parents" in w:Template:Infobox person
Domain
According to this template: persons
According to statements in the property:
human (Q5), character that may or may not be fictional (Q21070598), fictional character (Q95074), animal (Q729), deity (Q178885), archaic human (Q284851), group of mythical characters (Q20830276), hypothetical person (Q75855169), fictional human formerly considered to be historical (Q64520857), prosopographical phantom (Q64643615), legendary figure (Q13002315), human whose existence is disputed (Q21070568), mythical character (Q4271324), personification (Q207174), animalisation (Q2135501), group of fictional characters (Q14514600), human fetus (Q26513), stillborn child (Q2345820) or cultivar (Q4886)
When possible, data should only be stored as statements
Allowed valuesfemale persons, generally a single item (note: this should be moved to the property statements)
ExampleCharles III of the United Kingdom (Q43274)Elizabeth II (Q9682)
Jesus (Q302)Virgin Mary (Q345)
Ares (Q40901)Hera (Q38012)
Robot and gadget jobsDeltaBot does the following jobs: The consistency check gadget (see code) checks if the linked objects are linking back to the analyzed page as child (asymmetric reciprocal relations), but does currently not discover if father or mother links are missing from the analyzed page to objects that are linking to it as child.
Tracking: sameno label (Q42533257)
Tracking: usageCategory:Pages using Wikidata property P25 (Q22913754)
<complementary property>father (P22)
See alsorelative (P1038), stepparent (P3448), godparent (P1290)
Lists
Proposal discussionProperty proposal/Archive/1#P25
Current uses
Total669,189
Main statement665,90399.5% of uses
Qualifier3,2740.5% of uses
Reference12<0.1% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Item “sex or gender (P21): Items with this property should also have “sex or gender (P21)”. (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/P25#Item P21, search, SPARQL
Type “human (Q5), character that may or may not be fictional (Q21070598), fictional character (Q95074), animal (Q729), deity (Q178885), archaic human (Q284851), group of mythical characters (Q20830276), hypothetical person (Q75855169), fictional human formerly considered to be historical (Q64520857), prosopographical phantom (Q64643615), legendary figure (Q13002315), human whose existence is disputed (Q21070568), mythical character (Q4271324), personification (Q207174), animalisation (Q2135501), group of fictional characters (Q14514600), human fetus (Q26513), stillborn child (Q2345820), cultivar (Q4886): item must contain property “instance of (P31), subclass of (P279)” with classes “human (Q5), character that may or may not be fictional (Q21070598), fictional character (Q95074), animal (Q729), deity (Q178885), archaic human (Q284851), group of mythical characters (Q20830276), hypothetical person (Q75855169), fictional human formerly considered to be historical (Q64520857), prosopographical phantom (Q64643615), legendary figure (Q13002315), human whose existence is disputed (Q21070568), mythical character (Q4271324), personification (Q207174), animalisation (Q2135501), group of fictional characters (Q14514600), human fetus (Q26513), stillborn child (Q2345820), cultivar (Q4886)” or their subclasses (defined using subclass of (P279)). (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/P25#Type Q5, Q21070598, Q95074, Q729, Q178885, Q284851, Q20830276, Q75855169, Q64520857, Q64643615, Q13002315, Q21070568, Q4271324, Q207174, Q2135501, Q14514600, Q26513, Q2345820, Q4886, SPARQL
Single best value: this property generally contains a single value. If there are several, one would have preferred rank (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Epimetheus (Q41054), Prometheus (Q83160), Superman (Q79015), Hesperides (Q165938), Clark Kent (Q774772), Superboy (Q14621389), Superman (Earth-One) (Q7643821), Superman (Q2428427), Superman (Q4111541), José de San Martín (Q134160)
List of violations of this constraint: Database reports/Constraint violations/P25#single best value, SPARQL
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. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P25#inverse, SPARQL
Scope is as main value (Q54828448), as qualifier (Q54828449): the property must be used by specified way only (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/P25#Scope, SPARQL
Contemporaries:
if [item A] has this property (mother (P25)) linked to [item B],
then [item A] and [item B] have to coincide or coexist at some point of history. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Galba (Q1414), Roger I of Carcassonne (Q653945)
List of violations of this constraint: Database reports/Constraint violations/P25#Contemporary, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (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/P25#Entity types
Type “human (Q5), fictional character (Q95074), horse (Q726): element must contain property instance of (P31) with classes Q5, Q95074, Q726 or their subclasses (defined using subclass of (P279))
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/P25#Type Q5, Q95074, Q726
Single value: this property generally contains a single value.
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Epimetheus (Q41054), Prometheus (Q83160), Superman (Q79015), Hesperides (Q165938)
List of violations of this constraint: Database reports/Constraint violations/P25#Single value, SPARQL
Inverse property of “child (P40):
if [item A] has this property (P25) linked to [item B],
then [item B] should also have property “child (P40)” linked to [item A].
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/P25#Inverse, SPARQL
Item: items with this property should also have sex or gender (P21)
List of violations of this constraint: Database reports/Constraint violations/P25#Item P21, hourly updated report, SPARQL. Count by value
Target items of "mother (P25)" should have a statement with "sex or gender (P21)" = female (Q6581072), female organism (Q43445): If [item A] has this property with value [item B], [item B] is required to have property "sex or gender (P21)" = female (Q6581072), female organism (Q43445)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Loki (Q133147)
List of violations of this constraint: Database reports/Constraint violations/P25#Target required claim P21
Value type "person (Q215627), fictional character (Q95074), horse (Q726)": This property should use items as value that contain property instance of (P31). On these, the value for instance of (P31) should be an item that uses subclass of (P279) with value Q215627, Q95074, Q726 (or a subclass thereof).
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/P25#Value type Q215627, Q95074, Q726
Qualifiers “statement is subject of (P805),P794 (P794),kinship to subject (P1039): this property should be used only with the listed qualifiers.
List of violations of this constraint: Database reports/Constraint violations/P25#Qualifiers, hourly updated report, SPARQL

Template:Constraint:Value only

Mother didn't live during the same time as her child
death date of person A is before birth date of person B (Help)
Violations query: SELECT * { {SELECT ?item WHERE { ?item wdt:P25 ?item2 . ?item p:P569/psv:P569 ?birth1_node . ?birth1_node wikibase:timeValue ?birth1 . ?birth1_node wikibase:timePrecision "11"^^xsd:integer . ?item2 p:P570/psv:P570 ?death2_node . ?death2_node wikibase:timeValue ?death2 . ?death2_node wikibase:timePrecision "11"^^xsd:integer . FILTER (?birth1 > ?death2) } } UNION {SELECT ?item WHERE { ?item wdt:P25 ?item2 . ?item p:P570/psv:P570 ?death1_node . ?death1_node wikibase:timeValue ?death1 . ?death1_node wikibase:timePrecision "11"^^xsd:integer . ?item2 p:P569/psv:P569 ?birth2_node . ?birth2_node wikibase:timeValue ?birth2 . ?birth2_node wikibase:timePrecision "11"^^xsd:integer . FILTER (?birth2 > ?death1)} } }
List of this constraint violations: Database reports/Complex constraint violations/P25#Mother didn't live during the same time as her child


Merging

I've proposed merging this with father (P22). Please leave comments at Wikidata:Requests for comment/Merging relationship properties. Andrew Gray (talk) 20:55, 24 August 2015 (UTC)[reply]