Reservation Algorithm

  • Thread starter Thread starter jimmy
  • Start date Start date
J

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
 
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).
 
Back
Top