- From: Libby Miller <Libby.Miller@bristol.ac.uk>
- Date: Wed, 13 Dec 2000 12:46:00 +0000 (GMT)
- To: David Allsopp <dallsopp@signal.dera.gov.uk>
- cc: www-rdf-interest@w3.org
On Wed, 13 Dec 2000, David Allsopp wrote: > > But if I wanted a query along the lines of "What do people say John > Smith's age is?" I would need something like: > > select ?a where (?x rdf:type Statement)(?x rdf:subject JohnSmith)(?x > rdf:predicate age)(?x rdf:object ?a) > > which even for this trivial example is getting complex. I'd like a way > of 'drilling down' through reification, possibly through multiple layers > (A says that B says that John Smith is 42...). Hi David, You're right, this is a real nuisance, especially since queries like this also tend to be inefficient, because rdf:type statement, rdf:subject will be very common if you're dealing with a lot of reified statements. > > Perhaps the solution is to 'flatten' an RDF model containing reified > statements (applying filters according to the origin of the statements > or other criteria) to generate a model without any reifications, which > can be queried easily. I was trying to think around this problem, but I haven't bee able to work out how it can be done. If we have [bag1]-- 1 -- [Statement1] --- subject --- predicate --- object there's no obvious way to flatten it, because without reifying the statement there's no way to refer to the statement rather than its constituents. So it looks as if you can't connect parts of the model together unambiguously. I'd be very interested in any ideas you have about how to tackle this. On the plus side though, it does mean that you can have very general queries about a resource if you have lots of reified statements in a database, because e.g. select ?z, ?a where (?x rdf:type Statement)(?x rdf:subject JohnSmith)(?x rdf:predicate ?z)(?x rdf:object ?a) will get you all the predicate-object pairs with JohnSmith as the subject. cheers, Libby
Received on Wednesday, 13 December 2000 07:47:48 UTC