The simplest way I can think of would be to generate a Booking record
for each combination of Court and Date and Time, as far out as the
club allows customers to book.  The Booking record would have a
property that defined whether it was Available or Booked.  This feels
heavy handed, but if your courts are booked pretty heavily it might be
as efficient as anything else.

To reduce the number of entities, you might be able to create a Kind
that stores an entire day's worth of bookings for a particular court.
The available time slots could be listed either by a List property, or
individual properties for each time slot that is possible.  Either
way, you should be able to query by courts that are available.

On Nov 5, 7: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?
>
> 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.
>
> Can anyone help me out please?
>
> Thanks
> Ian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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