Database design - recurring events

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Database design - recurring events

Post by Luke »

I'm giving my event calendar application a pretty major overhaul. I want to allow for recurring events, but I'm not sure how to go about this in my database design. How would you guys go about it? Any ideas would be great.

Normally for this, I'd simply download an open-source PHP calendar and look at how they did it, but they all seem to want me to pay for them... :?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

the iCal standard has recurring events built in - and it would probably be the most convenient method to implement for compatibility reasons.

You can download Mozilla Sunbird and create various recurring events to test what it does in iCal format, but I'm sure there's a spec on the net somewhere as well.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

wow great idea... I had considered outputting to iCal format as a feature, but I hadn't thought of iCal as a storage medium. Thanks
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

You might have better performance designing your event database table after the iCal standard rather than simply storing your events as an iCal file... I smell a class brewing ;)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

this whole iCal thing is proving pretty difficult. Has anybody else every tried doing something like this? I can't decide whether to try and emulate the ical standard in a database, or to just store my events in ical files... neither seem any easier than the other. :?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Maybe http://microformats.org/wiki/hcalendar will help? Just aiming to include the info in iCal in your scheme would make it iCal compliant.
Post Reply