QUESTION 1:
I'm trying to create a room reservation system for school using wicket and MySQL, and I'm a bit confused with this one. I've already created the user database and rooms database. My question is how do I create a schema that accepts both repeating and non-repeating schedules?
example (repeating):
I can reserve a room for class at 9:00am - 12:00pm every Monday and Thursday, from June - October of 2009. How do I represent this in the schema?
example 2 (non-repeating)
I can reserve a room for a meeting from 12:00pm - 1:00pm on Sept.19, 2009.
How can I do both with one schema?
QUESTION 2:
I've made a temporary schema that only accepts non-repeating input with the following columns:
- reservationID (the primary key)
- itemID (item to be reserved)
- start (start date&time)
- end (end date&time)
my question is, before I insert another reservation, what query do I use to check that there's no other reservation on that same date and time?
Thanks for the help guys. I really appreciate it.