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

  • Home
  • SEARCH
  • 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 3279180
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:33:49+00:00 2026-05-17T19:33:49+00:00

For my web app i need to handle access requests. Requests are entered for

  • 0

For my web app i need to handle access requests. Requests are entered for a monday-sunday schedule specifying hours for each day. This week schedule can repeat up to 52 times. A user can have multiple schedules during a week (mon 8-9 and mon 10-11) There are the following requirements:

  1. Searchable/filterable
  2. Detect overlapping requests

I want the database to handle as much of the lifting as possible. Right now the only design I can think of is storing each day’s access as a separate record. Doing this I would pull all accesses for a user and loop to determine if the new request overlaps. This requires code or a stored procedure.

Does anyone have a better database model idea or a clean way to deal with overlaps in code?

  • 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-17T19:33:50+00:00Added an answer on May 17, 2026 at 7:33 pm

    If you store each access request in a table with fields with start_time and end_time, then you could use the database’s BETWEEN functionality to determine if a particular access would overlap with one already in the database.

    As an example, let’s say that someone had completed an access request for Monday from 9:00AM to 12:00PM.

    Then someone else comes and tries to make an access request for Monday from 11:00AM to 3:00PM. To determine if this would conflict with something else, you’d need to look for the following possible conditions:

    • start_time < Monday 11:00AM && end_time > Monday 11:00AM
    • start_time BETWEEN Monday 11:00AM & Monday 3:00PM
    • start_time == Monday 11:00AM || end_time == Monday 3:00PM

    These can bet translated down to a SQL query which would prevent having to load and iterate over records in the application. As a bonus, you can use transactions to guard against race conditions.

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

Sidebar

Related Questions

I have a LAMP (PHP) web app which need to interface with programs on
I am building a web app where I need to get all the images
I need to switch among 3 different environments when developing my web app -
I need to integrate a email client in my current python web app. Anything
I am working on a web app that uses Perl and I need to
For a web app I'm working on, I need to know the lat/lon of
I am going to be building a web app soon where I will need
I need some sort of interactive chart control for my .NET-based web app. I
I'm building a mobile web app targeting Android users. I need to know what
need ask you about some help. I have web app running in Net 2.0.

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.