[Activerdf] Searching for groups of objects

Eyal Oren eyal.oren at deri.org
Tue Apr 3 11:25:07 IST 2007


On 04/02/07/04/07 15:14 -0700, michael wrote:
>Generally I'd like to be able to find lists of objects sharing more than 
>one of the same property. I think it might help to consider a couple use 
>cases to get a good idea of the general form.
>
>For instance, say I have a movie database. Show me all the movies that have actors that
>have appeared in 5 or more films. Or say I have an orders database. Show me all the people
>that have made 5 or more orders.
>
>The previous examples all return a single type of object, however you shouldn't be limited
>to returning a single type. Say I have a theatrical database that has plays in addition to
>my movie database. Now I want to ask, show me all plays/movies that share actors, or
>directors.
ok, understood

>I started trying to come up with some syntax but thats a good part of solving the problem
>right there so I'll leave this as a specification clarification and work on thinking about
>syntax in my next email.
right, that's why I asked you ;-)

FYI, in rdflite we currently allow (although undocumented) things like:
- SIOC::Post.find :all
- SIOC::Post.find :all, :limit => 10
- SIOC::Post.find :all, :limit => 10, :order => DC::created
- SIOC::Post.find(:all, :limit => 10, :offset => 20, :order => DC::created, 
  :where => [SIOC::has_container, forum])

I don't like the where clause in that, but it's a start. Can we fit your 
where clause in there somehow, and improve the syntax while we're at it?
Any suggestions?


 -eyal


More information about the ActiveRDF mailing list