table design /sql question

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
 
A

Allen Browne

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
 
S

Stefan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top