CS FundamentalsVery hardGATE CS (PYQ pattern)

The owner O of a table issues, in this order (with GRANT OPTION each time): 1) O grants SELECT to A; 2) O grants SELECT to B; 3) A grants to C; 4) B grants to C; 5) C grants to D; 6) A grants to E. Then O executes REVOKE SELECT FROM A with cascade. Using the usual rule that a privilege survives only if it can be derived from the owner through a chain of earlier grants, which users still hold SELECT afterwards?

  1. A. B, C, D
  2. B. B and C only
  3. C. B, C, D and E
  4. D. B only

Correct answer: A. B, C, D

A and E lose it (E's only source was A). C also received it from B at step 4, before granting to D at step 5, so C keeps it and D's grant stays valid: B, C and D remain.

More DBMS and SQL questions

Exams that ask this topic