GWicke added a comment.

In https://phabricator.wikimedia.org/T85181#971763, @JanZerebecki wrote:

> No, just a list of things that were brought up, when people talked about 
> querying Wikidata. I don't like Ask. Only ever used Ask and Cypher. I think 
> the way Cypher goes about the problem is neat to work with (query by example 
> for graphs). I find MQL a bit unintuitive.


Cypher looks pretty imperative, which IMHO is not ideal if we'd like to 
independently optimize / rewrite queries.

> Is MQL a superset of wqd.wmflabs.org ?


Functionality-wise I believe that it covers pretty much everything wdq does, 
except for the AROUND predicate. In MQL as exposed by freebase, the best you 
can currently do is a bounding box with range queries on lat/lon. Adding an 
AROUND-like operator should not be too hard though. The support around 
optional: forbidden vs. != might be a bit more powerful in MQL.

> How would a recursive query (WITH RECURSIVE in SQL) / query including 
> trasitive properties look like in MQL? Example: everything that is directly 
> or indirectly/recursively subclass of organization.


I'm pretty sure that we'll want to flatten the common use cases for recursive 
queries into indexes:

- instance of / type hierarchy ('type' in freebase)
- geolocation containment

With this done, you can directly ask for the parent class & automatically match 
all items that are directly in a sub-class. Similarly, for geolocation you can 
transitively match anything that's within some region, even if it is defined to 
be within a sub-region.

MQL does support following edges, but encourages a limited depth of this 
traversal by requiring the query to spell out the exact structure. It does not 
allow queries with unspecified traversal depth.


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

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

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

To: GWicke
Cc: Spencerk, waldyrious, Addshore, thiemowmde, Daniel_Mietchen, JeroenDeDauw, 
JanZerebecki, aude, Ricordisamoa, mobrovac, GWicke, Tpt, daniel, Hardikj, 
Smalyshev, Manybubbles, hoo, jkroll, Wikidata-bugs, Jdouglas



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to