dcausse created this task.
dcausse added projects: Wikidata, Wikidata-Query-Service.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  The use of blank nodes makes an update process always a challenging operation 
(http://www.aidanhogan.com/docs/blank_nodes_jws.pdf). The use of blank nodes by 
wikibase is very limited and thus I propose to remove them to simplify the WDQS 
update strategy.
  
  In wikibase we use blank nodes for two purposes:
  
  - denote an //unknown value// (originally discussed in T95441 
<https://phabricator.wikimedia.org/T95441>)
  - owl constraints of wdno property
  
  For the unknown value use-case we seem to only use the blank node as a way to 
//filter// such unknown value.
  For the OWL constraints it's unclear if it is actually used/useful.
  
  For unknown values I suggest:
  
    wd:Q3 a wikibase:Item wdunk:P2 .
    wds:Q3-45abf5ca-4ebf-eb52-ca26-811152eb067c a wikibase:Statement wdunk:P2;
        wikibase:rank wikibase:NormalRank .
  
  A query like
  
    SELECT ?human
    WHERE {
        ?human wdt:P106 ?o
        FILTER isBLANK(?o) .
    }
  
  Would become
  
    SELECT ?human
    WHERE { ?human a wdunk:P106 }
  
  And
  
    SELECT ?human
    WHERE { ?human wdt:P106 ?o }
  
  Would now mean: //All entities with a known occupation//
  As opposed to //All entities with a known or unkown occupation//
  which should be written as:
  
    SELECT ?human
    WHERE { {?human wdt:P106 ?o} union {?human a wdunk:P106} }
  
  For OWL constraints I simply suggest to remove them or materialize the blank 
node.
  
    wdno:P109 a owl:Class ;
        owl:complementOf wdowl:P109 .
    
    wdowl:P109 a owl:Restriction ;
        owl:onProperty wdt:P109 ;
        owl:someValuesFrom owl:Thing .
  
  This is a breaking change to 
https://www.mediawiki.org/w/index.php?title=Wikibase/Indexing/RDF_Dump_Format 
if this is accepted I suggest a transition period where blank nodes would be 
kept, the use of //isBlank// from the query service could start emitting a 
deprecation warning.

TASK DETAIL
  https://phabricator.wikimedia.org/T244341

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: dcausse
Cc: Aklapper, dcausse, darthmon_wmde, Nandana, Lahi, Gq86, 
Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, Xmlizer, jkroll, 
Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to