fhucho writes:
 > 
 > Hi,
 > I am creating an app that will show movie showtimes. I want to show
 > list of movies for some city (let's say there are 2000 cities
 > altogether). I have an entity Movie, that contains info like movie
 > title, description, rating etc. How should I efficiently implement
 > this functionality (find all movies that are in theaters in some
 > particular city). A movie can be currently in more cities at the same
 > time of course.

You could use a ListProperty like:

class Movie(db.Model):
   cities = db.StringListProperty()
   # other fields...

And then search in those fields with a query like: SELECT * FROM Movies WHERE 
cities = "your_city"

There was a talk in this year's Google IO about this subject: 
http://code.google.com/events/io/sessions/BuildingScalableComplexApps.html

-- 
Federico Builes

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to