Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's no good speculating how Google does it; Whatever Google uses, it's backed by a truly massive server cluster, and is probably far more involved than you need. For a smaller app, even an enterprise-level app, there are straightforward methods to accomplish this.</p> <p>For the schema, I would store the appointment as an ordinary date/time, and the reminder either as another date/time (which you can calculate given hours and minutes using the TimeSpan structure), or as the number of Ticks in a TimeSpan. There are advantages and disadvantages to either; using a date/time reminder, you must recalculate that date/time if the appointment changes. But, the reminder time is human-readable when stored in schema. The opposite is true for storing the value as ticks; 15 minutes in TimeSpan ticks is 15 minutes, and you can add that to any datetime they specify for the actual appointment. But, it's just going to be a big number in the DB, requiring users to use your app to understand the data.</p> <p>You can store one reminder for an appointment on the appointment record itself, or you can allow many pre-scheduled reminders per appointment by maintaining a separate table that references the appointment record and contains the reminder time.</p> <p>For the actual reminder implementation, an app (or piece of functionality therein) that you create to handle these reminders should query the database for the first reminder of interest to the current user that will occur first, and set a timer to expire at the designated time. That thread will simply sleep for the required number of milliseconds, then fire an event which you'll use to show the reminder.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload