Hi:
Is there a definition of what queries against Wikidata are supposed to return?
In particular, how will queries interact with P1647 (subproperty of) and similiar aspect of Wikidata?
peter
On Mon, Jan 12, 2015 at 1:35 PM, Peter F. Patel-Schneider < pfpschneider@gmail.com> wrote:
Hi:
Is there a definition of what queries against Wikidata are supposed to return?
This is somewhat up in the air. Under the hood we have infinite flexibility but what gets returned I think varies a lot by the context of the query. Minimally we'll be returning the entity's id (Q2, etc).
In particular, how will queries interact with P1647 (subproperty of) and similiar aspect of Wikidata?
We're not sure yet. What kind of interaction are you looking for?
Nik
Suppose there is a property P that is a subproperty of Q and I query for the Q properties of some object O that has values for both P and Q. When I query for O's Q property values do I always get the P property values as well?
For example (using triples) daughter subpropertyof child . son subpropertyof child . John son Bill . John daughter Mary . does a query for John's children return Bill and Mary?
peter
On 01/12/2015 10:46 AM, Nikolas Everett wrote:
On Mon, Jan 12, 2015 at 1:35 PM, Peter F. Patel-Schneider <pfpschneider@gmail.com mailto:pfpschneider@gmail.com> wrote:
Hi: Is there a definition of what queries against Wikidata are supposed to return?
This is somewhat up in the air. Under the hood we have infinite flexibility but what gets returned I think varies a lot by the context of the query. Minimally we'll be returning the entity's id (Q2, etc).
In particular, how will queries interact with P1647 (subproperty of) and similiar aspect of Wikidata?
We're not sure yet. What kind of interaction are you looking for?
Nik
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Hi!
Suppose there is a property P that is a subproperty of Q and I query for the Q properties of some object O that has values for both P and Q. When I query for O's Q property values do I always get the P property values as well?
It is possible to do such lookup but I don't think the query engine should/would be doing it by default, since such lookups would be pretty expensive - query about one property which is easily indexed can potentially explode into dozens of independent property queries which would be harder to efficiently look up. But maybe we can have a syntax that would do the expansion in cases where it is required.
For example (using triples) daughter subpropertyof child . son subpropertyof child . John son Bill . John daughter Mary . does a query for John's children return Bill and Mary?
It is possible to make such kind of lookup, but it would probably be a two-stage lookup - i.e. first see if child has any subproperties, then lookup for children using the resulting list. We can have a syntax for this but I think it should be explicit - i.e. there should be a different way to ask for "child" and "child and everything beneath". The second way probably would be significantly more expensive. -- Stas Malyshev smalyshev@wikimedia.org
wikidata-tech@lists.wikimedia.org