Defining and using compartments and groups
By using compartments and groups, the granularity of access to data might be increased considerably. In this recipe, we will cover how to implement additional groups and compartments in the table EMPLOYEES_OLS_TBL
. The compartments will be created based on departments, and the groups will be based on countries and regions.
Getting ready
All steps will be performed on the HACKDB
database.
How to do it...
Before we start, it is mandatory to find and design a method to compartmentalize and group the data. This is shown in the following steps:
Each department manager must be able to see his own data. There will also be users with permissions to see the compartmentalized and grouped data corresponding to their departments. As the user
SKING
, issue the followingSELECT
to gather the needed information:SQL> conn SKING Enter password: Connected. SQL> select distinct job_title,country_name,email from hr.EMPLOYEES_OLS_TBL where job_title like '%Manager...