Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the information provided in the Baseball Database documentation included in Module 1, write the DDL to create the Parks table. Submit your answer as

Using the information provided in the Baseball Database documentation included in Module 1, write the DDL to create the Parks table.

Submit your answer as a single file with an SQL extension. For this assignment, your script is required to:

Write the DDL to create the Parks table. The script should include an IF statement (see script for creating the baseball database for examples) so that it could be run several times without changing anything in the script. See the 00 - Create Database.sql script for examples.

After loading the data to the table write the SQL using ATLER statements to create:

The appropriate primary key

A check statement to check that the country column contains one of these values: AU, CA, JP, MX, PR, UK, US

The Constrains must have a name included when you add the constraint. The constraint name must be different than the column the constraint is on. An example would be naming the primary key constraint Parks_PK

Your answer must be submitted as a .sql file. Your submission must include the SQL for steps 1 to 3. The INSERT statements to add the data do not have to be included. If your create table is correct, the data will load without problems.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions