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(a)wikimedia.org