1. Create a new table named CUSTOMER_STATUS.The table will hold the Customer_Sta
ID: 3806270 • Letter: 1
Question
1. Create a new table named CUSTOMER_STATUS.The table will hold the Customer_Status_Id and the Customer_Status_Description with possible values:
Inactive, Active, Very_Active
These values will be used to characterize the customers so that:
Inactive Customers => Have 0 orders
Active Customers => Have between 1 and 3 orders
Very Active Customers => Have 4 or more orders
2. Insert the data described above in table CUSTOMER_STATUS.
Part 02 Now we will change our data model so that the company can keep track of their most valuable customers. Our new data model will be: CUSTOMERS NUMERIC P CUSTOMER ID CUSTOMER FIRST NAME VARCHAR (50 BYTE) CUSTOMER LAST NAME VARCHAR (50 BYTE) Customer Status CUSTOMER ADDRESS VARCHAR (255 BYTE) CUSTOMER CITY VARCHAR (50 BYTE) P Customer Status Id Integer CUSTOMER STATE Customer Status name VARCHAR CUSTOMER ZIP VARCHAR (20 BYTE T T Customer Is Customer Status PK (Customer Status Id CUSTOMER PHONE VARCHAR 30 BYTE) CUSTOMER FAX VARCHAR 130 BYTE) F ustomer Status Id Integer CUSTOMERS PK (CUSTOMER ID) What will the new Relational schema look like?Explanation / Answer
Creating Table:
create table customer_status(custtomer_status_id varchar2(10) primary key,
current_satus_description varchar2(10),check (current_satus_description in
('Inactive','Active','Very_Active')));
Insert Value into Table:
insert into customer_status values('12b3','Active');
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.