Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 8th, 2003, 03:14 AM
krumms krumms is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Brisbane, Australia
Posts: 12 krumms User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Out of the Ordinary Database Design

I've got to design a database, and the requirements for this database are somewhat out of the norm, and it's causing me some problems. If anyone can offer some tips, they would be greatly appreciated.

Basically, my client's business can take appointments that are recurring weekly, fortnightly or monthly. Alternatively, there may be once-off appointments.

Weekly and fortnightly appointments can have several days associated with them: A customer may wish to make an appointment for every Monday and Tuesday for example (a weekly appointment with two occurances).

Monthly appointments may only take place once a month, so this isn't a huge problem.

Once off appointments only take place once for the lifetime of a customer, or are irregular enough that they do not fit into the above categories.

My initial idea was to create a "Booking" table which has a "BookingType" field that indicates whether the booking was weekly, fortnightly, monthly or once-off. Then, depending on the value of this BookingType, other tables may be looked up. In the case of weekly and fortnightly appointments, there is a separate table for each to indicate what days of a week should be associated with that recurring appointment (e.g. WeeklyAppointmentDay). All of these ancillary tables refer back to the main Booking table via a unique ID (implemented using MySQL AUTO_INCREMENT fields)

It feels like it's becoming awfully complex and hackish very quickly. How can I improve on the above? Let me know if I can provide any more information to assist you in assisting me!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Out of the Ordinary Database Design


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway