Please can I ask for assistance with my SQL constraints? I am new to SQL and kinda know what I want to do but don't know how to do it.


CREATE DATABASE [University_Assignment]

CREATE TABLE [Incidents]
(
Incident_ID [INT] [Primary Key] [AUTO_INCREMENT] [NOT NULL],
Year [INT] – Use a constraint to only allow values between 2014 and 2018.
Month [CHAR3] - Use a constraint to only allow Jan, Feb, Mar, Apr etc.
Day [CHAR3] – Use a constraint to only allow Mon, Tue, Wed, Thu, Fri, Sat, Sun.
Date [INT] – Use a constraint to only allow values between 1 and 31.
Time [TIME] – This should show the time as ‘hh:mm:ss’.
Severity_Level [CHAR3] – Use a constraint to only allow Low, Med, Hig.
)

CREATE TABLE [Location]
(
Incident_ID [INT] [FOREIGN KEY] Location.Incident_ID REFERENCES Incident.Incident_ID
Coordinate – Not sure how to address this one. It’s a 10x10 grid with coordinates from -5,-5 to 5,5. Can I apply a constraint to allow ‘-5,-5’ or ‘5,5’ or ‘3,5’ etc for all 100 possible values?
Should I then be able to still query which of those possible values are not associated with an incident_ID?

I then need to query it for:

At which coordinate do most incidents occur.
Which month has the most incidents.
Which day of the week has the fewest incidents.
Identify the 4 most common coordinates and show how many incidents appear at each.
How many coordinates have no incidents related to them.


I have also attached my schema diagram.
Slide1.JPG