469,611 Members | 1,966 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,611 developers. It's quick & easy.

Reservation DB Schema and Date checking

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.
Sep 16 '09 #1
0 2070

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Kimmo J?rvikangas | last post: by
2 posts views Thread by David Slinn | last post: by
1 post views Thread by Stefan Reiter | last post: by
5 posts views Thread by KarlM | last post: by
1 post views Thread by jimmy | last post: by
11 posts views Thread by jimmy | last post: by
1 post views Thread by brucepickford001 | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.