Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Write a SQL statement that creates a use named ray@localhost with a password

ID: 3830422 • Letter: 1

Question

1. Write a SQL statement that creates a use named ray@localhost with a password of "temp".
2. This user should have SELECT, INSERT, and UPDATE privileges for the Vendors table of the AP database.
3. This user should have SELECT, INSERT privileges for the Invoices table of the AP database.
4. This user should have SELECT privileges for the Invoice_Line_Items table of the AP database.

5. Using ONE statement write a GRANT statement that creates a user named dorothy with a password of "sesame", and grant this user the privileges to select, insert, and update data from any table in the AP database.

DO NOT ATTEMPT TO PUT THIS AS ONE SQL STATEMENT. IT WILL NOT WORK. THESE ARE SEPARATE STATMENTS.

Can you please solve these questions from 1 to 5 with separate answers please. this is from the database systems.

Explanation / Answer

Used ORACLE DATABASE

1). CREATE USER ray@localhost IDENTIFIED BY temp;
GRANT CONNECT TO AP;

2). GRANT
SELECT,
INSERT,
UPDATE
ON
schema.Vendors
TO
ray@localhost;

3). GRANT
SELECT,
INSERT
ON
schema.Invoices
TO
ray@localhost;

4). GRANT
SELECT
ON
schema.Invoices_Line_Items
TO
ray@localhost;

5). CREATE USER dorothy IDENTIFIED BY sesame;
GRANT
SELECT,
INSERT,
UPDATE
ON
AP
TO
dorothy;