MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

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 October 11th, 2000, 06:01 PM
Adrian2 Adrian2 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Location: London, England
Posts: 251 Adrian2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I'm designing a fully-featured web calendar. You've all seen the kind of thing. My problem is this:

I want the user to be able to add a recurring event with no end date. Say, an event that occurs every Friday, forever.

My current best plan for a data model has a single table for the events. The fields include start date and end date and a parent field that holds the event ID of the parent event if it is a series of recurring events.

So when a recurring event is entered, the first event in the series is created with a parent of 0, and it creates as many events as necessary on subsequent dates with the parent field set to the event ID of the first one in the series.

No problems then if you want to create a series with a defined end date, even if it's miles into the future. But how to do it if there's no end date?

So the approach I've explained is very data-intensive but easy on the processing. The alternative would be to create recurring events on the fly rather than store them as separate event records. But this sounds very processing-intensive. So even if the user wants to see February 2100, the recurring events will still be there.

The third, very nasty alternative is just to set an arbitrary limit to the end year. But that sounds very inelegant.

Has anyone ever modelled this or thought about it? What were your conclusions?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Web calendar data model


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
Stay green...Green IT