Question: Create a new database in MySQL called horsestable. List the databases in MySql. Result set should look like: Change to us the database horsestable. Show

Create a new database in MySQL called horsestable. List the databases in MySql. Result set should look like:

Change to us the database horsestable.

Show the current tables in database horsestable. Result set should look like:

Create a table in database horsestable called horse with the following attributes, data types, and constraints:

ID, integer, not null, auto increment

registered name, variable character - 15 characters

barn name, variable character 20 characters, not null

breed, variable character 20 characters

age, int

height, three numbers with one to the right of the decimal point

start date, date, not null

primary key is the ID field

Create a table in database horsestable called boarder with the following attributes, data types, and constraints:

ID, integer, not null, auto increment

first name, variable character - 20 characters, not null

last name, variable character 30 characters, not null

address, variable character 30 characters, not null

city, variable character 20 characters, not null

state, character 2 characters

zip, int, not null

primary phone, character 10 characters, not null

email address, variable character 30 characters

primary key is the ID field

Create a table in database horsestable called student with the following attributes, data types, and constraints:

ID, integer, not null, auto increment

first name, variable character - 20 characters, not null

last name, variable character 30 characters, not null

primary phone, character 10 characters, not null

email address, variable character 30 characters

primary key is the ID field

Create a table in database horsestable called grain with the following attributes, data types, and constraints:

ID, integer, not null, auto increment

manufacturer, variable character - 30 characters, not null

product, variable character 30 characters, not null

weight, integer

Cost, decimal with 5 values, 2 to the right of the decimal point, not null

primary key is the ID field

Create a table in database horsestable called hay with the following attributes, data types, and constraints:

ID, integer, not null, auto increment

type, enumeration with values of 'Coastal','Timothy','Orchard','Alfalfa','Peanut','Bermuda','Oat','Barley'

size, enumeration with values of 'Two string', 'Three string'

Cost, decimal with 5 values, 2 to the right of the decimal point, not null

Weight, integer, not null

primary key is the ID field

Create a table in database horsestable called bedding with the following attributes, data types, and constraints:

ID, integer, not null, auto increment

type, enumeration with values of 'Pellets', 'Shavings', 'Straw'

size, integer

cost, decimal with 5 values, 2 to the right of the decimal point, not null

primary key is the ID field

Create a table in database horsestable called staff with the following attributes, data types, and constraints:

ID, integer, not null, auto increment

first name, variable character - 20 characters, not null

last name, variable character 30 characters, not null

primary phone, character 10 characters, not null

email address, variable character 30 characters

type, enumeration with values of Trainer, Groom, Barn Staff, Maintenance

primary key is the ID fiel/d

Create a table in database horsestable called stall with the following attributes, data types, and constraints:

stall_id, integer, not null, auto increment

stall_number, enumeration with values of 1,2,3,4,5,6,7,8,9,10

base_price, floating point, not null, 5 digits, 2 digits to the right of the decimal point

primary key is the stall_id field

Create a table in database horsestable called pasture with the following attributes, data types, and constraints:

pasture_id, integer, not null, auto increment

pasture_number, enumeration with values of 1,2,3,4

base_price, floating point, not null, 5 digits, 2 digits to the right of the decimal point

primary key is the pasture_id field

Perform test cases in table below. Use whatever screenshot program your computer has to provide the output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!