Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table design

Status
Not open for further replies.

sean2510

Technical User
Jun 9, 2011
4
GB
Hi
I have browsed the web and this forum but cant seem to find a solution to my question. (although there are many questions on the same topic).

Basicly, I am building a customer appointments database. The end result will be a system where the user can book/delete/amend appointments (with pre set time 15 minute slots) and by clicking on the name in a particular slot be able to view the client record details. There will need to be 4 seperate 'diarys' seen side by side.

I am happy with the client record details bit, however my queston is this.

What would be the best way to set up the table that holds the appointment slots? I need to be able to see the name of the cliet in a particular slot, and the reason for the appointment.

The only way i can see is to have 4 tables (one for each diary)
each table would have a new row for each appointment date and time. For example row 1 would be 01/06/2011 at 08:00. Row 2 would be 01/06/2011 at 08:20.

The problem with this is that there would be 36 time slots (rows) per day. This is going to result in a massive data table and the problem of manualy entering each date/time in advance.

There must be a better way to set up the tables for apointments? Do any of you have any suggestions? I have searched for examples with no luck, and have considered outlook, but decided this would not be suitable.

So, help. I know setting up an appintments diary is a big, complicated task, so i want to have the most effective way to hold my data.

any suggestions appreciated.

Sean

 
I dont know what you mean by 4 diary but from what i am reading in your post you need 4 tables
Datetable
1)dateid
2)dayofyear
1,1/1/11
2,1/2/11
3,1/3/11
...
xxx,12/29/11
yyy,12/30/11
zzz,12/31/11
???,1/1/12
1/2/12
.....

daytimestable
1)Daytimeid
2)timeofday

12:00 am
12:15 am
12:30 am
....
11:15 pm
11:30 pm
11:45 pm

Cleintstable
clientid
clientname
otherclientinformation

appointmenttable
appointmentid
clientid
dateid
Daytimeid

clientid ,dateid Daytimeid
1 1 1
1 1 2
2 1 4
2 1 5

this information is that
client 1 has an appointment on 1/1/11 from 8:00 am -->8:30am
client 2 has an appointment on 1/1/11 from 8:45 am -->9:15am

a query can tell you that the 8:30-->8:45 slot is empty



the rest can be done with queries
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top