Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I NEED HELP WITH THIS QUESTION, I AM AT A LOSS. T Create the Vehicle and VehicleEvent tables with columns matching the table diagram above
I NEED HELP WITH THIS QUESTION, I AM AT A LOSS.
T Create the Vehicle and VehicleEvent tables with columns matching the table diagram above and with the appropriate keys and constraints. Some additional notes: - All "ID", "Number", and "Code" columns should use unsigned INT data types. - All primary keys should auto-increment. - The vehicle's model name should be limited to 20 characters. 455256.3061114.q3zqy7 \begin{tabular}{l|l} LAB & 6.8.1: Create Vehicle and EventVehicle tables \\ ACTIVITY & 6.1. \end{tabular} 0/10 Main.sql Load default template... \begin{tabular}{l|l} LAB & 6.8.1: Create Vehicle and EventVehicle tables \end{tabular} 0/10 Main.sql Load default template... \begin{tabular}{l|l} 11 & CREATE TABLE Event ( \\ 12 & EventNumber INT UNSIGNED AUTO_INCREMENT, \\ 13 & EventDateTime DATETIME NOT NULL, \\ 14 & LocationDesC TEXT(1000) NOT NULL, \\ 15 & ReportDesc TEXT(5000), \\ 16 & EventCode CHAR(2) NOT NULL, \\ 17 & CauseEventNumber INT UNSIGNED, \\ 18 & ReportOfficerNumber INT UNSIGNED NOT NULL, \\ 19 & PRIMARY KEY (EventNumber), \\ 20 & FOREIGN KEY (CauseEventNumber) \\ 21 & REFERENCES Event (EventNumber) \\ 22 & ON UPDATE SET NULL \\ 23 & ON DELETE SET NULL, \\ 24 & FOREIGN KEY (ReportOfficerNumber) \\ 25 & REFERENCES Officer (OfficerNumber) \\ 26 & ON UPDATE RESTRICT \\ 27 & ON DELETE RESTRICT \\ 28 & ; . \\ 29 & \end{tabular}Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started