5.14 LAB - Create Horse table with constraints Create a Horse table with the following columns, data types, and constrai

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

5.14 LAB - Create Horse table with constraints Create a Horse table with the following columns, data types, and constrai

Post by answerhappygod »

5 14 Lab Create Horse Table With Constraints Create A Horse Table With The Following Columns Data Types And Constrai 1
5 14 Lab Create Horse Table With Constraints Create A Horse Table With The Following Columns Data Types And Constrai 1 (86.23 KiB) Viewed 42 times
5.14 LAB - Create Horse table with constraints Create a Horse table with the following columns, data types, and constraints: • ID - integer with range 0 to 65 thousand, auto increment, primary key RegisteredName - variable-length string with max 15 chars, not NULL ● Breed - variable-length string with max 20 chars, must be one of the following: Egyptian Arab, Holsteiner, Quarter Horse, Paint, Saddlebred Height - number with 3 significant digits and 1 decimal place, must be ≥ 10.0 and ≤ 20.0 • BirthDate - date, must be ≥ Jan 1, 2015 Note: Not all constraints can be tested due to current limitations of MySQL. 411354.2011884.qx3zqy7 LAB ACTIVITY 5.14.1: LAB - Create Horse table with constraints Main.sql 1 create table Horse ( 2 ID smallint auto_increment primary key, 3 RegisteredName varchar(15) not null, 4 Breed varchar(20) check (Breed in ('Egyptian Arab', 'Holsteiner', 'Quarter Horse', 'Paint', 'Saddlebred')), 5 Height numeric (3,1) check (Height in(10.0,20.0)), 6 BirthDate date check (BirthDate >= '2015-01-01')); 7 8/10
Latest submission - 9:06 PM EDT on 07/03/22 Only show failing tests 1: Test ID column ^ Your result Expected result Field Type Null Key Default ID smallint(6) NO PRI NULL auto_increment Type Extra Field Null Key Default ID smallint(5) unsigned NO PRI NULL Extra auto_increment Total score: 8/10 Download this submission 0/1
6: Test no extra columns Your result Expected result ID Breed Registered Name varchar(15) NO varchar(20) YES decimal(3,1) YES Field Height BirthDate ID Breed Field Type Null Key Default smallint(6) NO PRI NULL Height BirthDate date Registered Name varchar(15) varchar(20) decimal(3,1) Type date YES NO YES YES NULL Null Key Default smallint(5) unsigned NO PRI NULL auto_increment NULL YES NULL NULL NULL auto_increment NULL Extra NULL NULL Extra 0/1
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply