Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CREATE TABLE store_reps (rep_ID NUMBER(5), last VARCHAR2(15), frst VARCHAR2(10), Commchar(1) DEFAULT 'Y', CONSTRAINT REP_ID PRIMARY KEY (REP_ID));Table created.2.ALTER TABLE store_reps MODIFY (last CONSTRAINT store_reps_last_nn NOT

CREATE TABLE store_reps (rep_ID NUMBER(5), last VARCHAR2(15), frst VARCHAR2(10), Commchar(1) DEFAULT 'Y', CONSTRAINT "REP_ID" PRIMARY KEY ("REP_ID"));Table created.2.ALTER TABLE store_reps MODIFY (last CONSTRAINT store_reps_last_nn NOT NULL, frstCONSTRAINT store_reps_frst_nn NOT NULL);Table altered.3.ALTER TABLE store_reps ADD CONSTRAINT store_reps_comm_ck CHECK (comm IN ('Y','N'));Table altered.4.ALTER TABLE store_reps ADD (Base_salary Number(7,2)) ADD CONSTRAINTstore_reps_Base_salary_ck CHECK (Base_salary > 0);Table altered.5.CREATE TABLE Book_stores (Store_ID Number(8), Name Varchar2(30), contact varchar2(30),Rep_ID varchar2(5), CONSTRAINT book_stores_store_ID_pk PRIMARY KEY (Store_ID),CONSTRAINT book_stores_name_uk UNIQUE (name));Table created.6.alter table book_stores modiy (rep_ID number(5)) add constraint book_stores_rep_ID_oreign key (Rep_ID) reerences Store_Reps (Rep_ID);Table altered. (There was an error the frst me)7.(ORA-02275: such a reerenal constraint already exists in the table)

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

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago