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 242813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:52:08+00:00 2026-05-11T20:52:08+00:00

I have to store scheduled events, (like say class times, for example) that can

  • 0

I have to store scheduled events, (like say class times, for example) that can be organized on a weekly, daily or monthly basis. Events can occur, say, every Monday and Wednesday, or every second Thursday of the month. Is there a way to store this information in an RDBMS that adheres to 3NF?

EDIT: This is not homework; I’m building something with a friend for our own edification and we want it in 3NF.

To be specific, I’m trying to store the schedules for mass and confession times at RC parishes. These can be scheduled in a hell of a lot of ways, such as every Sunday at x time or every Tue/Thu at a different time. Sometimes it’s only the third Friday of the month,and others are only offered at a certain time once a year. I need to not only store this information, but query it, so that I can quickly get a comprehensive list of available times in the next day or week or whatever.

I suppose that strictly speaking 3NF isn’t a requirement, but it would be easier for us if it were and it’s better to get it correct off the bat than to change our schema later.

  • 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-11T20:52:09+00:00Added an answer on May 11, 2026 at 8:52 pm

    Yes I have solved this problem with my co-worker in the following way:

    CREATE TABLE [dbo].[Schedule](
        [ID] [int] IDENTITY(1,1) NOT NULL,
        [StartDate] [datetime] NOT NULL,
        [EndDate] [datetime] NULL
    )
    
    CREATE TABLE [dbo].[ScheduleInterval](
        [ID] [int] IDENTITY(1,1) NOT NULL,
        [ScheduleID] [int] NOT NULL,
        [ScheduleIntervalUnitID] [int] NOT NULL,
        [Interval] [smallint] NOT NULL
    )
    
    CREATE TABLE [dbo].[ScheduleIntervalUnit](
        [ID] [int] NOT NULL,
        [Name] [varchar](50) NULL
    )
    
    INSERT INTO ScheduleIntervalUnit (ID, Name)
    SELECT '1' AS [ID], 'Day' AS [Name] UNION ALL
    SELECT '2' AS [ID], 'Week' AS [Name] UNION ALL
    SELECT '3' AS [ID], 'Month' AS [Name] 
    

    A schedule spans a length of time and intervals occur within that length of time. The schedule interval unit determines the length of the interval (days as in “every other” (2) or “every third” (3) etc.), week (day of the week, such as Monday, Tuesday, etc), and month (of the calendar year). Using this you can conduct queries and logic against your database to retrieve schedules.

    If your schedules need better resolution – down to hours, minutes, seconds – look at the Unix implementation of cron. I originally started down that route, but found the above to be a much more simplistic and maintainable approach.

    A single date/time span – such as a defined school semester starting Sept 9th and ending Nov 4th – can contain multiple schedules (so every Monday for Art class, and “every other day” for Phys Ed – but you’ll need to do more work for considering holidays and weekends!).

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

Sidebar

Related Questions

I have to store a string (non-numeric, can contain any UTF8 Chars) in a
I have a decent working web application (Java/Servlet/Jsp) that I would like to improve
I have an existing data structure I'm forced to work with whereby scheduled events
I have a C# program that will run as a windows scheduled task. This
We have many C# console apps that run on scheduled tasks. All of these
Can anyone please help with ARC and memory-related crashes? I have class LTRequest with
I have a job stored on a database, scheduled to run every day. But
I have store a sample document inside my local server named template.doc. Then I
I have to store key value pairs in java which is more memory efficient
I have to store more than 100 millions of key-values in my HashMultiMap (key

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.