Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6679609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:22:44+00:00 2026-05-26T04:22:44+00:00

I need to develop an application that supports schedules. Example of schedules: Jan 1,

  • 0

I need to develop an application that supports “schedules”. Example of schedules:

  • Jan 1, 2011 at 9am
  • Jan 1, 2011 from 9am to 10am
  • Every Monday at 9am, from Jan 1, 2011
  • Every Monday at 9am, from Jan 1, 2011 to Feb 1, 2011
  • Every Monday at 9am, from Jan 1, 2011 for 10 occurrences
  • etc.

If you have seen Outlook’s scheduler, that’s basically what I need. Here’s a screen shot of their UI: http://www.question-defense.com/wp-content/uploads/2009/04/outlook-meeting-recurrance-settings.gif

How would I model such information in a database? Keep in mind that I also need to query this, such as:

  • What are the scheduled events for today?
  • What are the next 10 dates/times for a particular recurring scheduled event?
  • Etc.

I’m using PHP/MySQL, but am open to alternative solutions. Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:22:44+00:00Added an answer on May 26, 2026 at 4:22 am

    My personal opinion is to create all the events separately, with a start and end date. Then generate a unique identifier for the event (perhaps the event ID of the first you create) and assign it to all events (so you know they are somehow linked).

    Advantages:

    • easy to do (you just calculate when the event should happen
      and create them all only once)
    • easy to change (you can save the recurrence perhaps on the first
      event, and then rebuild them all – remove and re-create)
    • easy to delete (they have a common unique ID)
    • easy to find (same as above)

    Disadvantages:

    • You need a start and end date

    — appended from here —

    Proposed Model:

    Table Event

    • id big int (auto increment)
    • ref_id big int (this is kind of foreign key to the id)
    • date_start date
    • date_end date
    • title string
    • .. your custom fields ..
    • saved_recurrence text

    Imagine you have an event repeating 4 weeks every Wednesday and Friday:

    • gather the recurrence stuff in an object and convert it to JSON (recurrence type, period, final date, ..)
    • calculate the dates of every single event
    • create the first event on the table Event with ref_id=0 and saved_recurrence=saved JSON object and get the id that was used (auto incremented)
    • update this first event record and set ref_id=id
    • create the next events always with this same ref_id (saved_recurrence can be empty here)

    You should now have 8 events (2 every week for 4 weeks) that have the same ref_id. This way it’s easy to fetch events in any date interval. When you need to edit an event, you just check for ref_id. If it’s 0 it’s a single isolated event. If not, you have a ref_id that you can search to get all event instances.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to develop an iPhone application that is a Client of serverside application.
I need to develop an iPhone/iPod Touch application that creates a server to send
I need to develop an application that connects to various DSN's using the Microsoft
I need to develop an application that will check whether the phone is in
I need to develop an application that will read and understand text file in
i'm need to develop and web application that uses maps, and i have two
i need to develop an application providing TV-Out support. i noticed, that the displayed
I need to develop an application that monitors, and potentially filters (rejects the calls),
I need to develop a simple application that allows the user to write some
I need to develop a client heavy web application that works on Android tablets.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.