Create table for the consultants


Discuss the below:

Q: You have three new consultants arriving to work for your company as database programmers. You want them to be able to create tables in the USER_AUTO tablespace that use up to a maximum of 10 M of space each. In addition, you want them to change their passwords every week, and you want the system to log them off the database if their sessions are idle for more than ten minutes. The three user names to create are CONS01, CONS02, and CONS03. The profile to create for the consultants is named TEMPCONSULT. Write and execute the commands needed to accomplish these goals

CREATE USER MSTEWARD IDENTIFIED BY M123$;

populate the tables in the CLASSMATE schema ***

REM Employees

INSERT INTO CLASSMATE.EMPLOYEE (EMPLOYEE_ID ,JOB_TITLE ,
FIRST_NAME ,LAST_NAME ,PHONE_NUMBER )
VALUES (1 ,'WRITER' ,'Jerry' ,'Hanson' ,'555-444-2345 ext 24');

INSERT INTO CLASSMATE.EMPLOYEE (EMPLOYEE_ID ,JOB_TITLE ,
FIRST_NAME ,LAST_NAME ,PHONE_NUMBER )
VALUES (2 ,'CHIEF EDITOR' ,'Amanda' ,'Gaines' ,'555-444-2345 ext 31');

INSERT INTO CLASSMATE.EMPLOYEE (EMPLOYEE_ID ,JOB_TITLE ,
FIRST_NAME ,LAST_NAME ,PHONE_NUMBER )
VALUES (4 ,'EDITOR' ,'Orlando' ,'Cortez' ,'555-444-2345 ext 19');

INSERT INTO CLASSMATE.EMPLOYEE (EMPLOYEE_ID ,JOB_TITLE ,
FIRST_NAME ,LAST_NAME ,PHONE_NUMBER )
VALUES (20 ,'FREELANCE WRITER' ,'Joe' ,'Howard' ,'555-322-1234');

INSERT INTO CLASSMATE.EMPLOYEE (EMPLOYEE_ID ,JOB_TITLE ,
FIRST_NAME ,LAST_NAME ,PHONE_NUMBER )
VALUES (12 ,'MANAGER' ,'Susan' ,'Cross' ,'555-444-2345 ext 99');

INSERT INTO CLASSMATE.EMPLOYEE (EMPLOYEE_ID ,JOB_TITLE ,
FIRST_NAME ,LAST_NAME ,PHONE_NUMBER )
VALUES (23 ,'MANAGER' ,'Edward' ,'Black' ,'555-444-2345 ext 25');

INSERT INTO CLASSMATE.EMPLOYEE (EMPLOYEE_ID ,JOB_TITLE ,
FIRST_NAME ,LAST_NAME ,PHONE_NUMBER )
VALUES (33 ,'DELIVERY PERSON' ,'Barney' ,'Frost' ,null);

INSERT INTO CLASSMATE.EMPLOYEE (EMPLOYEE_ID ,JOB_TITLE ,
FIRST_NAME ,LAST_NAME ,PHONE_NUMBER )
VALUES (35 ,'PROGRAMMER' ,'Bert' ,'Ernest' ,'555-334-2039');

REM News Articles

INSERT INTO CLASSMATE.NEWS_ARTICLE (ARTICLE_ID ,AUTHOR_ID
,TITLE ,RUN_DATE ,APPROVAL_EDITOR_ID ,APPROVAL_DATE ) VALUES
(1 ,1 ,'Child Saves Puppy' ,'21-JAN-2004',2 ,'12-jan-2004');
INSERT INTO CLASSMATE.NEWS_ARTICLE (ARTICLE_ID ,AUTHOR_ID
,TITLE ,RUN_DATE ,APPROVAL_EDITOR_ID ,APPROVAL_DATE ) VALUES
(1 ,1 ,'American Hero' ,'23-JAN-2004',2 ,'20-jan-2004');

commit;

Solution Preview :

Prepared by a verified Expert
PL-SQL Programming: Create table for the consultants
Reference No:- TGS01932418

Now Priced at $25 (50% Discount)

Recommended (96%)

Rated (4.8/5)