Hi. Can you please explain what you are trying to achieve with removing the instance of (P31) from lots of different items? You are creating multiple constraint violations across the database where linked items are looking for P31 on the parent item.
Topic on User talk:Cdo256
Jump to navigation
Jump to search
Reply to "removal of P31 on multiple items"
Also, please note that you should never remove a deprecated statement. A deprecated statement is already inactive and your removal of it just makes it more likely that it is reinserted later as valid. See Help:Deprecation.
Hiya Shore. Sorry for creating issues with constraints. Most of what I wanted to do was make ensure that items that have subclasses and aren't metaclasses should be P279 instead of P31. I also removed P31's that appeared to be wrong. Could you give an example of what constraint violations I've created? In general do you know how I could see a report of what constraint violations I've caused recently? Regarding deprication, that was a mistake is there a way to see removal of depricated statements?
The query that I've been using is as follows:
The following query uses these:
- Items: object (Q488383)
, resource (Q1554231) , structure (Q6671777) , work (Q16532276) , artificial entity (Q16686448) , hypothetical entity (Q18706315) , class or metaclass of Wikidata ontology (Q21522864) , individual entity (Q23958946) , (meta)class (Q23960977) , unknown (Q24238356) , spatio-temporal entity (Q58415929) , state (former and current) (Q96196009) , current entity (Q96196524) , collection entity (Q99527517)
- Properties: subclass of (P279)
, instance of (P31) 1 SELECT DISTINCT ?item ?itemLabel ?item2 ?item2Label 2 WHERE 3 { 4 VALUES ?item3 { 5 wd:Q488383 6 wd:Q1554231 7 wd:Q6671777 8 wd:Q16532276 9 wd:Q16686448 10 wd:Q18706315 11 wd:Q21522864 12 wd:Q23958946 13 wd:Q23960977 14 wd:Q24238356 15 wd:Q58415929 16 wd:Q96196009 17 wd:Q96196524 18 wd:Q99527517 19 } . 20 ?item2 wdt:P279 ?item3 . 21 ?item p:P31/ps:P31 ?item2 . 22 ?item0 wdt:P279 ?item 23 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } 24 } 25 ORDER BY DESC(?item2) 26 LIMIT 3000
The idea behind it is that it's looking for cases where it sees P279/P31/P279 which can only be correct for meta-classes and then I look at the results and decide whether P31 should be changed to P279. I used the the description of P31 and P279 from Help:Basic membership properties and also by looking at the description and examples on instance of (P31) and subclass of (P279).
I can only give you a partial answer here as I am not familiar with the query side of the system. I'll bring this up on Project Chat to see if someone can offer further advice. However, I suspect that there won't be any reports that can pinpoint constraint violations yyou have caused or your removal of deprecated statements as they are the result of blanking data; the query won't be able to identify the absence and link it to you.
For what I can answer, an example of the constraint violations is your removal of instance of (P31) related to occupation (P106). occupation (P106) has a value type constraint (Q21510865) with a qualifier for relation (P2309) = instance of (P31).