How do I store null values in a triplestore database?
Should I use no triples for null values or use something like rdf:nil ? If I use no triples, how do I query then for non existing triples?
How do I store null values in a triplestore database?
Should I use no triples for null values or use something like rdf:nil ? If I use no triples, how do I query then for non existing triples?
You can use the FILTER NOT EXISTS
syntax to check for non-existence
For example assuming you know the subject and predicate and want to check for a null value i.e. non-existence of the relevant triple you could do the following:
ASK WHERE
{
FILTER NOT EXISTS { <http://subject> <http://predicate> ?value }
}