RelationalDBDesignRelationalDBDesign


Security Roles   «Prev 

Using DBA Roles

There are 2 roles with 2 different set of privileges for the COIN table, the VIEW_COIN role, which only has SELECT privileges, and the ADD_COIN role, which can also INSERT and UPDATE rows
1) There are 2 roles with 2 different set of privileges for the COIN table, the VIEW_COIN role, which only has SELECT privileges, and the ADD_COIN role, which can also INSERT and UPDATE rows

User1 is initially assigned the VIEW_COIN role
2) User1 is initially assigned the VIEW_COIN role

With this role, User1 can select data from the COIN table
3) With this role, User1 can select data from the COIN table

As long as User1 is only assigned the VIEW_COIN role, he or she cannot insert data into the table
4) As long as User1 is only assigned the VIEW_COIN role, he or she cannot insert data into the table

The same INSERT statement works fine when User 1 is assigned the ADD_COIN role
5) The same INSERT statement works fine when User 1 is assigned the ADD_COIN role