Further SPARQL Features
- Constraining Values
SELECT ?a, ?b
WHERE (?x 'parent' ?a)
(?b 'brother' ?x) AND age(?b) < 30
- (“age” is an application specific function)
- Optional Constraints:
SELECT ?a, ?b, ?c
WHERE (?x 'parent' ?a)
(?b 'brother' ?x)
OPTIONAL (?b 'age' ?c)
- (return age if known)
- SPARQL is still a draft!