Question

In: Computer Science

Q1)Write the syntax SQL DCL “GRANT” and and REVOKE Commands? Q2 ) Write SQL DCL Commands?...

Q1)Write the syntax SQL DCL “GRANT” and and REVOKE Commands?

Q2 ) Write SQL DCL Commands?

i. To give the user Ahmad permission to view and modify records in the table Employee.

ii. To revoke the permission to view and modify the records in the table Employee.

Solutions

Expert Solution

Answer:

Q1) The SQL Data controlling language(DCL) has two commands namely GRANT and REVOKE.

GRANT Command: GRANT Command is used to give privileges(permissions) to the users.

The syntax for GRANT command is--

GRANT privilege_name on objectname to user;

Here,privilege names are SELECT,UPDATE,DELETE,INSERT,ALTER,ALL

objectname is table name.

user is the name of the user to whom we grant privileges.

REVOKE Command: REVOKE Command is used to remove the privileges granted to user on database objects.

The syntax for REVOKE command is--

REVOKE privilege_name on objectname from user;

Here,privilege names are SELECT,UPDATE,DELETE,INSERT,ALTER,ALL

objectname is table name.

user is the name of the user whose privileges are removing.

Q2)

i) To give the user Ahmad permission to view and modify records in the table Employee.

The DCL Command is--

GRANT SELECT,UPDATE on Employee to Ahmad.

Explanation: Firstly to give the permissions to user,We have to use GRANT command.The privileges are SELECT because to view the records and UPDATE to modify the records.The objectname is table name which is Employee.The user name is Ahmad.

ii) To revoke the permission to view and modify the records in the table Employee.

The DCL Command is--

REVOKE SELECT,UPDATE on Employee from Ahmad.

Explanation: Firstly to revoke the permissions to user,We have to use REVOKE command.The privileges Need to revoke are SELECT because to view the records and UPDATE to modify the records.The objectname is table name which is Employee.The user name is Ahmad.

Hope you understand and like the answer.

Thank you..


Related Solutions

Q1. What do you mean by A view in SQL language? Give an example? Q2. Explain...
Q1. What do you mean by A view in SQL language? Give an example? Q2. Explain the role of SQL authorization mechanisms that allow to differentiate among the users of the database as far as the type of access they are permitted on various data values in the database?
arranged q1 to q2 to q3 a is between q1 and q2 b is between q2...
arranged q1 to q2 to q3 a is between q1 and q2 b is between q2 and q3 Let a=3 m, b=7 m, q1=2 C, q3=-3 C. What must q2 be for q1 to feel no net force. b) Let a=3 m, b=8 m, q1=4 C, q2=5 C, q3=-5 C. What is the magnitude of the electric field a distance c=4 m vertically above q2 i.e. located at (x,y)=(a,c)?
Suppose the utility function for goods q1 and q2 is given by U(q1,q2)=q1q2 +q2 (a) Calculate...
Suppose the utility function for goods q1 and q2 is given by U(q1,q2)=q1q2 +q2 (a) Calculate the uncompensated (Marshallian) demand functions for q1 and q2 (b) Describe how the uncompensated demand curves for q1 and q2 are shifted by changes in income (Y) or the price of the other good. (c) Calculate the expenditure function for q1 and q2 such that minimum expenditure = E(p1, p2, U) (d) Use the expenditure function calculated in part (c) to compute the compensated...
Suppose the utility function for goods q1 and q2 is given byU(q1,q2)=q1q2 +q2 (a) Calculate the...
Suppose the utility function for goods q1 and q2 is given byU(q1,q2)=q1q2 +q2 (a) Calculate the uncompensated (Marshallian) demand functions for q1 and q2 (b) Describe how the uncompensated demand curves for q1 and q2 are shifted by changes in income (Y) or the price of the other good. (c) Calculate the expenditure function for q1 and q2 such that minimum expenditure = E(p1, p2, U) (d) Use the expenditure function calculated in part (c) to compute the compensated demand...
Let Q1, Q2, Q3 be constants so that (Q1, Q2) is the critical point of the...
Let Q1, Q2, Q3 be constants so that (Q1, Q2) is the critical point of the function f(x, y) = (175)x 2 + (−150)xy + (175)y 2 + (−200)x + (400)y + (230), and Q3 = 1 if f has a local minimum at (Q1, Q2), Q3 = 2 if f has a local maximum at (Q1, Q2), Q3 = 3 if f has a saddle point at (Q1, Q2), and Q3 = 4 otherwise. Let Q = ln(3 +...
Let Q1, Q2, Q3 be constants so that (Q1, Q2) is the critical point of the...
Let Q1, Q2, Q3 be constants so that (Q1, Q2) is the critical point of the function f(x, y) = (90)x 2 + (0)xy + (90)y 2 + (−72)x + (96)y + (40), and Q3 = 1 if f has a local minimum at (Q1, Q2), Q3 = 2 if f has a local maximum at (Q1, Q2), Q3 = 3 if f has a saddle point at (Q1, Q2), and Q3 = 4 otherwise. Let Q = ln(3 +...
Q1. Write notes on electric field. Q2. Write short notes electric field.
Q1. Write notes on electric field. Q2.  Write short notes electric field.
Given a utility function: U(q1, q2) = q1 + q 2^2 where q1 and q2 is...
Given a utility function: U(q1, q2) = q1 + q 2^2 where q1 and q2 is the consumption of good 1 and good 2 respectively. and the budget constraint: p1q1 + p2q2 = Y where p1 and p2 are prices of good 1 and good 2 respectively, Y is the consumer’s income a. Holding p2 and Y fixed, find the demand function for good 2. b. Holding p1 and p2 fixed, find the functional form of the Engel curve for...
answer the following question for oracle developer: 1- ____ is the category of SQL commands to...
answer the following question for oracle developer: 1- ____ is the category of SQL commands to create, alter or drop SQL objects (create a table, drop a view) 2-____ handles access to objects. The DBA might grant select on Customers to Bob. This will allow user Bob to read the Customers table. 3- Run this query in SQL Developer: Select sysdate from dual What is sysdate? What is dual? 4-What is a surrogate key? How are surrogate keys implemented in...
Suppose the utility function for goods q1 and q2 is given by U(q1, q2) = q1q2...
Suppose the utility function for goods q1 and q2 is given by U(q1, q2) = q1q2 + q2 6 (a) Calculate the uncompensated (Marshallian) demand functions for q1 and q2 2 (b) Describe how the uncompensated demand curves for q1 and q2 are shifted by changes in income (Y) or the price of the other good. 3 (c) Calculate the expenditure function for q1 and q2 such that minimum expenditure = E(p1, p2, U) 4 (d) Use the expenditure function...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT