On Wed, Nov 5, 2008 at 4:09 PM, Ian Bambury <[EMAIL PROTECTED]> wrote: > I think this is the last question I need answered in order to see if GAE can > do what I need. > Imagine a database of sports clubs all of which have customers for tennis > courts > My idea is that I have > Club > Customer > Booking > Court > where a booking has a reference to the court and the customer and the club, > and also holds the date and time of the booking (just the hour to make > things simple, and we'll assume all bookings are an hour long) > Two things: > a) Is this evil 'old' thinking and I should be doing something else?
Seems perfectly sensible to me. > b) If not, then how would I find out if there were a free tennis court > somewhere in any of the clubs at a certain time and on a certain date? > It's easy enough to find existing bookings on that day and at that time, but > how do I find a court without a booking? > I believe it is not possible to retrieve all the courts and get rid of the > ones with bookings because there will be more than 1000 courts in the > system. You could create booking objects for all possible courts and times, and mark them as either "booked" or "vacant"; you can then filter on that field very quickly. Dave. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
