table design /sql question

  • Thread starter Thread starter Stefan
  • Start date Start date
S

Stefan

Hello,
I'm new at database design and I'm trying to make my first real program.
Administration /reservation of numberplates to be used in car garage
now the following fields are in the database
-user who made the input
-date/time out
-date/time back
-customer name
-destination
-memo
-back (yes/no)
-out (yes/no)

now i can see which numberplates are out and which are still available

So , i want to add a new module(the reservation of plates)
When i customer comes in and asks for using any numberplate,
i want to give in the date/time out date/time back and i when i push the
button
i want a grid filt with available license plates in that period
Now i'm not sure how to do the reservation part in table design.
Any suggestions
 
To find the vehicles that are available from one date/time to another, you
need to locate those have no booking for any period in that timeframe. The
basic idea is that two events overlap if both:
A starts before B ends, and
B starts before A ends.

If you have to handle Nulls (e.g. not known when the vehicle will be back),
it gets a bit more involved. See:
Clashing Events/Appointments
at:
http://allenbrowne.com/appevent.html
 
thanx allen
that's what i was looking for
Allen Browne said:
To find the vehicles that are available from one date/time to another, you
need to locate those have no booking for any period in that timeframe. The
basic idea is that two events overlap if both:
A starts before B ends, and
B starts before A ends.

If you have to handle Nulls (e.g. not known when the vehicle will be back),
it gets a bit more involved. See:
Clashing Events/Appointments
at:
http://allenbrowne.com/appevent.html
 
Back
Top