Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JustLee Books has become the exclusive distributor for a number of books. The company now needs to assign sales representatives to retail bookstores to handle

JustLee Books has become the exclusive distributor for a number of books. The company now needs to assign sales representatives to retail bookstores to handle the new distribution duties. For these assignments, create new tables to support the following:

1. 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 NUMBER(5), last VARCHAR2(15), first VARCHAR2(10), comm CHAR(1));

2. Change the STORE_REPS table so that NULL values cant be entered in the name columns (First and Last).---------------------------------------------

3. Change the STORE_REPS table so that only a Y or N can be entered in the Comm column. --

4. Add a column named Base_salary with a datatype of NUMBER(7,2) to the STORE_REPS table. Ensure that the amount entered is above zero. -------

5. Create a table named BOOK_STORES to include the columns listed in the following chart.

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

Describe Balor method and give the chemical reaction.

Answered: 1 week ago

Question

How to prepare washing soda from common salt?

Answered: 1 week ago