:a :p 1 .Example query pattern:
:a :p 2 .
{ ?x :p [] }How many answers? Blank nodes are existential variables in RDF; named variables (the regular
?x
ones) are universal variables. Queries don't return the binding of an existential; queries can return the binding of a named variable and the bound value of a named variables can be passed to other parts of the query (FILTERs, OPTIONALs etc) via the algebra.In the absence of a DISTINCT in the query, are the solutions to this pattern:
- 1 : ?x = :a
- 2 : ?x = :a , ?x = :a
- Either 1 or 2
I would say there is a fourth option here, see this example, which would be:
- { { ?x:subject = :a, p1:predicate1 = :p, o1:object1 = 1 } , { ?x:subject = :a, p1:predicate1 = :p, o1:object = 2 } }
If you keep track of where the variable were bound you can still count the distinct instances without redefining project.
No comments:
Post a Comment