none
Recurring Appointment Database Storage RRS feed

  • Question

  • Hello,

    I am writing an application that handles scheduling of appointments. I will need to support recurring appointments and I anticipate performance problems should I go about this naively.

    I believe my task is pretty simple to explain. One query might be to retrieve all appointments within a week. Or, all appointments within a month. Of course, these queries should combine results for single and recurring appointments. Specifically, I think I should be trying to avoid calculations within my select statement when I retrieve information from the database. So, I'm wondering if anyone has suggestions on how/what data should be stored to ensure my queries are optimal.

    Thanks in advance for any helpful suggestions!

    Tuesday, August 15, 2006 6:55 PM

All replies

  • What's more common? someone doing a query for all meetings in a week/month or someone altering a recurring appointment (I would say the queries are more popular). You can "denormalize" the recurring appointment and have the instances in the main appointment table (mark the recurring appointment they belong to. Also have a recurring appointments table that holds the parent level information (number of occurrences etc.) any change to the parent can cause all the children to update. Also it makes it easy to make changes to a single occurrence

    Arnon

    Sunday, August 20, 2006 4:53 PM
  • Ya, I concur with Arnon, There could be a parent table for recurring appointments, a child table for appointment with recurrence_id as foreign key. While creating a recurring appointment insert the 'series' for all  the 'occurence's.You can follow the MS Outlook appointment & scheduling!
    Friday, September 1, 2006 6:27 PM