Home All Groups Group Topic Archive Search About

Reservation Algorithm

Author
10 Dec 2006 1:20 AM
jimmy
Hi all,

I am currently developing a reservation management program however i am
having trouble finding a way in which i can check whether a table is
free at a specific time or not. When the program is setup i will get
the manager to enter how many tables there are. There will then be a
screen where customers can enter a reservation time and for how many
people. I need a way of checking against a list of already stored
reservations. How would you recommend going about this?

Thanks in advance

James

Author
10 Dec 2006 4:55 PM
Spam Catcher
"jimmy" <james.herring***@tiscali.co.uk> wrote in
news:1165713628.119567.34730@n67g2000cwd.googlegroups.com:

>  There will then be a
> screen where customers can enter a reservation time and for how many
> people. I need a way of checking against a list of already stored
> reservations. How would you recommend going about this?

Store the table list in the database. Check against the database before you
reserve the table.

You should wrap the SQL call in a transaction to prevent any concurrency
issues (i.e. 2 users reserving the same table).