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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:06:53+00:00 2026-06-17T04:06:53+00:00

So initially I was thinking something like this. CREATE TABLE `events` ( `event_id` INTEGER

  • 0

So initially I was thinking something like this.

CREATE TABLE `events` (
    `event_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
    `event_name` VARCHAR(200),
    `date_added` DATETIME
    PRIMARY KEY(event_id)
);

CREATE TABLE `event_date` (
    `event_id` INTEGER UNSIGNED NOT NULL,
    `start_date` DATE,
    `end_date` DATE,
    FOREIGN KEY event_id REFERENCES events(event_id) ON DELETE CASCADE
);

CREATE TABLE `event_times` (
    `event_id` INTEGER UNSIGNED NOT NULL,
    `event_date` DATE,
    `start_time` TIME,
    `end_time` TIME,
    FOREIGN KEY event_id REFERENCES events(event_id) ON DELETE CASCADE
);

Would it be possible to make sure that the even_times.event_date falls within the event_date.start_date and event_date.end_date range, with this schema?

  • 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-06-17T04:06:54+00:00Added an answer on June 17, 2026 at 4:06 am

    With this structure I think you cover the needs that explain

    CREATE TABLE events(
      event_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
      event_name VARCHAR(200) DEFAULT NULL,
      date_added DATETIME DEFAULT NULL,
      PRIMARY KEY (event_id)
    );
    
    CREATE TABLE event_date(
      event_date_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
      event_id INT(10) UNSIGNED NOT NULL,
      start_date DATE DEFAULT NULL,
      end_date DATE DEFAULT NULL,
      PRIMARY KEY (event_date_id),
      INDEX FK_event_date_events_event_id (event_id),
      CONSTRAINT FK_event_date_events_event_id FOREIGN KEY (event_id)
      REFERENCES events (event_id) ON DELETE CASCADE ON UPDATE RESTRICT
    );
    
    CREATE TABLE event_times(
      event_time_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
      event_date_id INT(10) UNSIGNED NOT NULL,
      start_time TIME DEFAULT NULL,
      end_time TIME DEFAULT NULL,
      PRIMARY KEY (event_time_id),
      INDEX FK_event_times_event_date_event_date_id (event_date_id),
      CONSTRAINT FK_event_times_event_date_event_date_id FOREIGN KEY (event_date_id)
      REFERENCES event_date (event_date_id) ON DELETE CASCADE ON UPDATE RESTRICT
    )
    

    ;

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

Sidebar

Related Questions

Imagine a database table that looks like this: create table [dbo].[user] ( id int
I have a decorator chain that looks like this when initially created: IType calculator
I am thinking of making an (initially) small Web Application, which would eventually have
For my web application, I am thinking about using the Spring framework. Initially, I
Initially I had designed this flash based navigation menu for my website, after going
Initially I thought this was going to work, but now I understand it won't
How can I create a dynamic list of files in Ant, then save this
I am trying to create a table view, in which the table view cells
I'm trying to decide if this is not very nice, or not. Basically, I
I was tasked to create this Joomla component (yep, joomla; but its unrelated) and

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.