Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Reservation System Database Design

 
   Database Forums (Home) -> General Discussion RSS
Next:  Convert Access 2003 Back To Access 97 Problem  
Author Message
Gary

External


Since: Dec 07, 2005
Posts: 2



(Msg. 1) Posted: Wed Dec 07, 2005 5:31 am
Post subject: Reservation System Database Design
Archived from groups: comp>databases (more info?)

I need some ideas on a mySQL database design for a reservation system,
much like a doctor's office (hopefully without the long wait).

My client has 12 work areas. She wants her clients to be able to sign up
for sessions at these areas on-line. The clients will sign up for either
1.5 or 2 hours, and she only wants 4 people to be able to start every
half hour.

I would like to avoid having to iterate through every half hour of every
day to determine if there are available opennings that the client could
sign up for.

My initial thought was to have a table of sessions, which had a field
for start time and end time, then use a COUNT query to find out how many
users had a start time at that half hour, but we need to present the
user with a view of which time slots are available for each half hour.
Since the interface is via the internet, I am afraid that this will
require a lot of data to be sent back and forth.

If anyone has any suggestions on an efficient way to do this, I would
really appreciate some assistance.

Thanks in advance.

Gary Holt

 >> Stay informed about: Reservation System Database Design 
Back to top
Login to vote
Jim Kennedy

External


Since: Dec 16, 2003
Posts: 217



(Msg. 2) Posted: Wed Dec 07, 2005 7:38 am
Post subject: Re: Reservation System Database Design [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Gary" wrote in message

> I need some ideas on a mySQL database design for a reservation system,
> much like a doctor's office (hopefully without the long wait).
>
> My client has 12 work areas. She wants her clients to be able to sign up
> for sessions at these areas on-line. The clients will sign up for either
> 1.5 or 2 hours, and she only wants 4 people to be able to start every
> half hour.
>
> I would like to avoid having to iterate through every half hour of every
> day to determine if there are available opennings that the client could
> sign up for.
>
> My initial thought was to have a table of sessions, which had a field
> for start time and end time, then use a COUNT query to find out how many
> users had a start time at that half hour, but we need to present the
> user with a view of which time slots are available for each half hour.
> Since the interface is via the internet, I am afraid that this will
> require a lot of data to be sent back and forth.
>
> If anyone has any suggestions on an efficient way to do this, I would
> really appreciate some assistance.
>
> Thanks in advance.
>
> Gary Holt

If it is a reservation system for a Dr.'s office then make sure you read the
HIPAA regulations. (if you are in the US) You probably don't look good in
a florescent orange jump suit.
Jim

 >> Stay informed about: Reservation System Database Design 
Back to top
Login to vote
Paul

External


Since: Jun 29, 2005
Posts: 110



(Msg. 3) Posted: Wed Dec 07, 2005 2:55 pm
Post subject: Re: Reservation System Database Design [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Jim Kennedy" wrote:


> If it is a reservation system for a Dr.'s office then make sure you read the
> HIPAA regulations. (if you are in the US) You probably don't look good in
> a florescent orange jump suit.


Naaah, it's Club Fed for that kind of white collar error/crime.



Paul...




>Jim


--

plinehan __at__ yahoo __dot__ __com__

XP Pro, SP 2,

Oracle, 9.2.0.1.0 (Enterprise Ed.)
Interbase 6.0.1.0;

When asking database related questions, please give other posters
some clues, like operating system, version of db being used and DDL.
The exact text and/or number of error messages is useful (!= "it didn't work!").
Thanks.

Furthermore, as a courtesy to those who spend
time analysing and attempting to help, please
do not top post.
 >> Stay informed about: Reservation System Database Design 
Back to top
Login to vote
jcelko2121

External


Since: Dec 07, 2004
Posts: 587



(Msg. 4) Posted: Wed Dec 07, 2005 7:01 pm
Post subject: Re: Reservation System Database Design [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Start with a table of the time slots youhave each day.

CREATE TABLE TimeSlots
(timeslot TIMESTAMP NOT NULL PRIMARY KEY);

Put a lot of constraints on the appointments table.

CREATE TABLE Appointments
(client_id INTEGER NOT NULL,
start_time TIMESTAMP NOT NULL
CHECK (<< falls on 1/2 hr>>),
end_time TIMESTAMP NOT NULL,
CHECK (<< falls on 1/2 hr>>),
CHECK (INTERVAL (end_time - start_time) MINUTES
IN (INTERVAL 90 MINUTES,
INTERVAL 120 MINUTES)),
etc.);

The query will be something like this:

SELECT T.timeslot, COUNT(A.client_id) AS appt_tally
FROM Appointments AS A,
TImeSlots AS T
WHERE T.timeslot BETWEEN A.start_time AND A.end_time
GROUP BY T.timeslot;
HAVING COUNT(A.client_id) <= 4;
 >> Stay informed about: Reservation System Database Design 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Large Database System - Hi there, We have been looking for some time now for a database system that can fit a large distributed computing project, but we haven't been able to find one. I was hoping that someone can point us in the right direction or give us some advice. Here....

database design - I don't have much idea of Blogs and Tags. Can anyone suggest some book and any other resource from where I can find more about blog and Tags. I want to desgin a database for Tag Structure. Database design that can store heirarchy of tags developed my..

Database structure for a booking system storing nights boo.. - Hi, I am reseaching into the best method for implementing a booking system data structure. My booking system in full will be used to store details on landlords apartments .. this part isnt too big an issue for me as I can have a table called 'landlord'....

Database design best practice - I was wondering what the conventional wisdom said about the following scenario: Lets say you have a company that sells cars. It has 1 head office and 3 remote sales offices which are connected to the head office via DSL. You have a simple database..

database design question - hi , while designing a database with huge tables that are meant to hold hundreds of thousdands of rows, is it a good idea to flatten the tables a bit in order to accomodate better for queries that require many joins ? i know that this contradicts with...
   Database Forums (Home) -> General Discussion All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]