Question: Create three or more SQL Data Control Language (DCL) Statements using the Homework Database: for the CCP Vehicle Loan System Database Create 2 new users
Create three or more SQL Data Control Language (DCL) Statements using the Homework Database: for the CCP Vehicle Loan System Database
- Create 2 new users statement for the database. One of the new user names should be based on yourself containing your name.
- Statements that grant privileges to the two new users. Statements granting privileges to at least 2 of the tables in the assigned database to the two new users
- Statements that revoke privileges from the two new users. Statements revoking privileges to at least 2 of the tables in the assigned Database to the two new users

1. CREATE DATABASE IF NOT EXISTS CCPVehicleLoan; 2. USE CCPVehicleLoan; 3 4. 5 6 7 8 9 10 11 12. 13 14 15 16 17 18 19 20 21. 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36. 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60. 61 62 63 64 65 66 67 68 CREATE TABLE IF NOT EXISTS Faculty er ); CREATE TABLE IF NOT EXISTS Vehicle ( ); fid CHAR(10), fname VARCHAR(40) NOT NULL, ); CONSTRAINT Faculty_PK PRIMARY KEY (fid) CREATE TABLE IF NOT EXISTS TFAS ( ); vnum CHAR(10), vid VARCHAR(50), vname VARCHAR(50) NOT NULL, CONSTRAINT Vehicle_PK PRIMARY KEY (vid) er fid FK CHAR(10), ename VARCHAR(50) NOT NULL, eid VARCHAR(50), CREATE TABLE IF NOT EXISTS Reservation Form ( CONSTRAINT TFAS_PK PRIMARY KEY (eid), CONSTRAINT TFAS_FK1 FOREIGN KEY (fid_FK) REFERENCES Faculty (fid) fid FK CHAR(10), vtype VARCHAR(50), formID VARCHAR(50), formName VARCHAR(50), departureDate DATE, CREATE TABLE IF NOT EXISTS DigitalTripCheckout ( CONSTRAINT Reservation Form_PK PRIMARY KEY (formID), CONSTRAINT Reservation Form_FK1 FOREIGN KEY (fid_FK) REFERENCES Faculty (fid) fMemberID CHAR(10), onum INT, maintenanceCheckID VARCHAR(50), CONSTRAINT DigitalTripCheckout_PK PRIMARY KEY (onum), CONSTRAINT DigitalTripCheckout FK FOREIGN KEY (fMemberID) REFERENCES Faculty (fid) CREATE TABLE IF NOT EXISTS Fuel onum FK INT, fuelMiss FLOAT, fuelFull INT, CONSTRAINT Fuel_PK PRIMARY KEY (fuelMiss), CONSTRAINT Fuel FK FOREIGN KEY (onum_FK) REFERENCES DigitalTripCheckout (onum)
Step by Step Solution
3.43 Rating (156 Votes )
There are 3 Steps involved in it
Here are SQL Data Control Language DCL statements for the CCP Vehicle Loan System Database Create 2 new users CREATE USER yourusername IDENTIFIED BY yourpassword CREATE USER seconduser IDENTIFIED BY s... View full answer
Get step-by-step solutions from verified subject matter experts
