lab requires you to use Oracle VIEW to implement a virtual database on DBSEC schema, for...

60.1K

Verified Solution

Question

Programming

lab requires you to use Oracle VIEW to implement a virtualdatabase on DBSEC schema, for example, on CUSTOMER table. Your taskis to develop a single SQL script that will perform all thefollowing tasks:

Table created for this assignment is listed below:

create table CUSTOMER_VPD(

SALES_REP_ID NUMBER(4),

CUSTOMER_ID NUMBER(8) NOT NULL,

CUSTOMER_SSN VARCHAR(9),

FIRST_NAME VARCHAR(20),

LAST_NAME VARCHAR(20),

ADDR_LINE VARCHAR(40),

CITY VARCHAR(30),

STATE VARCHAR(30),

ZIP_CODE VARCHAR(9),

PHONE VARCHAR(15),

EMAIL VARCHAR(80),

CC_NUMBER VARCHAR(20),

CREDIT_LIMIT NUMBER,

GENDER CHAR(1),

STATUS CHAR(1),

COMMENTS VARCHAR(1025),

USER_NAME VARCHAR(30)

);

Tasks:

Populate the CUSTOMER_VPD table withfour rows of records. Pay attention to the column CTL_UPD_USER,

Create a VIEW named as MY_VIEW todisplay only rows that belong to the logged in user

Grant SELECT and INSERT privilege onMY_VIEW to DBSEC_CLERK

Insert one row of data into MY_VIEW asDBSEC_CLERK by using the following data

Verify your data insertion by queryMY_VIEW. You (as DBSEC_CLERK) should only see one row of data youhave inserted. This signifies the success of yourimplementation.

Answer & Explanation Solved by verified expert
3.5 Ratings (435 Votes)
Below you can find everything clear and feel free to ask any doubts and please dont forget to give upvote as it means a lot Thanks firstly login with DBSEC connect DBSECpassword Task ACreate table customer create table CUSTOMER SALESREPID    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students