I'm doing a major Year 12 IT assignment, and my teacher can't find a solution.
I really need one within a few days, because we have to start our projects soon
and they'll be due within two weeks.
I'm creating a database for a client - a restaurant - and part of it
is a table booking system. I have a table called Reservations:
- TABLENO
- DATE
- TIME
etc
My problem lies in the fact that:
- same table cannot be booked at the same time on the same night
But the following can be booked:
- same table, same time, different date
- same table, same date, different time (most likely at set intervals from a drop-down list - e.g. at 30 min intervals, say)
- multiple tables, same date, same time
I originally thought of creating primary keys, or at least
preventing duplicate data entry, for each field. However, I realised
this was not practical as it would prevent the combinations listed
above from occurring (I think - I'm not incredibly experienced on all
this and find setting up table relationships most challenging of all!)
If you could help me, I'd be most grateful. Ideally the solution
would still only involve using one table, but if it really had to
have more than one table, I could cope!
Also (ideally) the solution wouldn't involve SQL or
VB (because I
don't understand it much) but if it had to, I'd also cope.
If you can, please email your response directly to me at
grace_adair@yahoo.co.uk. Many thanks, Grace.