How about: Country (name*) City (name*, Key countryKey) Event (id*, description, timeGMT, List<Ticket>, List<Performer>, Key cityKey) ?
----- Best regards, Dzmitry Lazerka On Sun, Jan 9, 2011 at 11:17, Sydney <sydney.henr...@gmail.com> wrote: > I have the following model: > > Country (name*, List<City>) > City (name*, List<Event>) > Event (id*, description, timeGMT, List<Ticket>, List<Performer>) > Ticket (id*, type, price, quantity) > Performer(id*, band, startTime) > > So this is a 4-level deep model. Here is some of the query I want to run: > All Country that has Event that occurs after a specific date > All City from a specific Country that has Event that occurs after a > specific date > All Event from a specific City that has Event that occurs after a specific > date > > With these 3 queries I can create an interface where a user select a > country, then the city and finally gets the events. I won’t be able to do > these queries with my current model but I read that denormalization is > usually the answer. Is there a reference document explaining > denormalization? > > From what I read, to run the query I want, I will have to duplicate the > country and city name in the event entity. Then I will be able to run the > query with no join. Denormalization looks like a SQL View except that it is > stored. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.