Thank you for your reply. I do know that there is no requirement for
ContentProviders to map URIs one-to-one to tables. To clarify, I am
asking about the case where the ContentProvider and the joined DB are
in separate applications, so the join can't be done within the SQLite
engine. The CursorJoiner class you reference seems to be designed for
exactly what I am talking about, but I would still appreciate any
insights anyone has in making a manual join like this efficient.

Thanks again,
Jay

On Mar 10, 3:07 pm, Kostya Vasilyev <kmans...@gmail.com> wrote:
> Not sure I understand the question: the implementation of a
> ContentProvider doesn't have to map data URIs to one particular table each.
>
> It's probably the most obvious thing to do, but it doesn't have to be
> this way. You can map URIs to DB queries any way you like, and include
> JOIN's if needed (just use db.rawQuery for this).
>
> And then there is:
>
> http://developer.android.com/reference/android/database/CursorJoiner....
>
> if you need to do the join yourself. Which is just a simple helper class
> that makes joins more efficient by requiring that both result sets (left
> & right) are sorted.
>
> -- Kostya
>
> 10.03.2011 22:40, Jay Bloodworth пишет:
>
> > Is there a standard or recommended idiom for doing the equivalent of a
> > join of data in a local database versus a content provider?  is there
> > anything more efficient than explicitly looping on the result set from
> > the local database query and doing individual queries of the content
> > provider to grab the related rows?
>
> > Jay
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to