Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MYSQL HELP THANKS 8. Modify the following SQL command so that the Rep_ID column is the PRIMARY KEY for the table and the default value

MYSQL HELP THANKS

image text in transcribed

8. Modify the following SQL command so that the Rep_ID column is the PRIMARY KEY for the table and the default value of Y is assigned to the Comm column. (The Comm column indicates whether the sales representative earns commission.) CREATE TABLE STORE_REPS ( Rep_ID INT(5), Last VARCHAR(15), First VARCHAR(10), Comm CHAR(1)); 9. Change the STORE_REPS table so that NULL values CANNOT be entered in the name columns (First and Last). 10. Create a table named BOOK_STORES to include the columns listed in the following chart: 11. Add a constraint to make sure the Rep_ID value entered in the BOOK_STORES table is a valid value contained In the STORE_REPS table, and the associated rows of the BOOK_STORES table are deleted automatically if a row in the STORE_REPS table is deleted. 12. Create a table named REP_CONTRACTS containing the columns listed in the following chart. A composite PRIMARY KEY constraint including the Rep_ID, Store_ID, and Quarter columns should be assigned. In addition, FOREIGN KEY constraints should be assigned to both the Rep_ID and Store_ID columns

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions