title: Android querying many to many relationships
body: <p>From reading I've understood the way to implement my many-to-many relationship was to have a separate 'Routing Table'. Here's an example of how I've done this:</p>
  
  <pre><code>CREATE TABLE Places (_id INTEGER PRIMARY KEY, name TEXT);
  
  CREATE TABLE Tags (_id INTEGER PRIMARY KEY, name TEXT);
  
  CREATE TABLE RoutingTable_PlacesTags (places_id INTEGER, tag_id INTEGER, FOREIGN KEY(places_id) REFERENCES Places(_id), FOREIGN KEY(tag_id) REFERENCES tags(_id));
  </code></pre>
  
  <p>In my database helper class, I want to have a method that returns a Cursor to all rows in Places that have a particular tag, <em>Cursor fetchPlaces(int tagID)</em>. (To allow filtering by tag within the app)</p>
  
  <p><strong>What would be the correct/best way to go about implementing this?</strong></p>
  
  <p>I was going to query RoutingTable_PlacesTags, use the returned Cursor to build an array/List of ids for Places, then have another method that I call passing a list/array of id's that returns them all. While I know this would work I'm sure there must be a much cleaner way to do it? </p>
  
  <p>Thanks.</p>