Write the correct SQL statements to grant the following privileges Solved

An owner of a relational database (ADMIN) created the following relations:

STUDENT = (ID, NAME, TOTAL_CREDIT, DEP_NUMBER)

INSTRUCTOR = (ID, NAME, SALARY, DEP_NUMBER)

COURSES = (COURS_ID, TITLE, DEP_NUMBER, CREDITS)

DEPARTMENT = (DEP_NUMBER, BUILDING, BUDGET)

The ADMIN user wants to pass privileges to other accounts X, Y and Z. Write the correct SQL statements to grant the following privileges.

1-Account X can retrieve or modify any relation except COURSES and can pass any of these privileges to other accounts.

 
2- Account Y can retrieve all the attributes of STUDENT and COURSES except TOTAL_CREDIT, DEP_NUMBER for both relations. [2 marks]

 

3- Account Z can retrieve any attribute of INSTRUCTOR but only for those whom working on the IT (DEP_NUMBER=2). [1 mark]
Powered by