Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement a virtual database on DBSEC schema, for example, on CUSTOMER/CUSTOMERS table(depending on how your spelled it). Your mission is to develop a single SQL

Implement a virtual database on DBSEC schema, for example, on CUSTOMER/CUSTOMERS table(depending on how your spelled it). Your mission is to develop a single SQL script that will perform all the following tasks(scripts are already attached here):

Please submit  a screenshot of the final output.

Total 5 steps: 

 

  1. Drop Customer/Customers table and re-create it or alter the table and include the new column. Insert the new data(data file is attached) provided here.
  2. Create a view called MY_VIEW. (Syntax and the data are attached)
  3. Grant permissions as listed below to the user DBSEC_CLERK.
  4. Login as DBSEC_CLERK. Insert the one record attached in the notepad here.
  5. Query as DBSEC_CLERK.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

LAB STARTS HERE:

 

  1. Connect to DBSEC/secc$1new, the same user you created in previous projects.
  2. Createe a CUSTOMER/CUSTOMERS table with the following columns: (You need to drop/ alter the current table and re-create it to accommodate the new field "USER_NAME")
Column NameData Type
SALES_REP_IDNUMBER(4)

CUSTOMER_ID
 

NUMBER(8) NOT NULL
CUSTOMER_SSNVARCHAR2(9)
FIRST_NAMEVARCHAR2(20)
LAST_NAMEVARCHAR2(20)
ADDR_LINEVARCHAR2(80)
CITYVARCHAR2(30)
STATEVARCHAR2(30)
ZIP_CODEVARCHAR2(9)
PHONEVARCHAR2(15)
EMAILVARCHAR2(80)
CC_NUMBERVARCHAR2(20)
CREDIT_LIMITNUMBER
GENDERCHAR(1)
STATUSCHAR(1)
COMMENTSVARCHAR2(1024)
USER_NAMEVARCHAR2(30)


 

3. Populate the CUSTOMER table with the data file attached here .
 

4. Createe a VIEW named as MY_VIEW to display only rows that belong to the logged in user.
 

5. Grant SELECT and INSERT privilege on MY_VIEW to DBSEC_CLERK.

6. Connect to DBSEC_CLERK/inft6157clerk. (This user was created in Project 4.)

7. Insert one row of data into MY_VIEW as DBSEC_CLERK by using the following data. You may need to make corrections on the statement, but keep the data as they are.

8. Verify your data insertion by querying MY_VIEW. You (as DBSEC_CLERK) should only see one row of data you have inserted. This signifies the success of your implementation. (Please submit a snapshot of this step even if it's not successful)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

I can provide you with SQL scripts to perform the tasks youve outlined Please note that I cant provi... 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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions