Virtual Private Database (VPD) is a powerful Oracle Database security feature that allows you to implement row-level security, centralizing access security mechanisms within the database. The basic idea behind this approach is that each user, when successfully authenticated, is authorized to access only certain rows within a database table or view protected with a VPD security policy.
Note
The Virtual Private Database feature is available only in Oracle Database Enterprise Edition. If you're using another edition of Oracle database, consider using a view-based approach when implementing row-level security, as discussed in the preceding section.
Since a VPD policy can be applied directly to a database table and is enforced whenever data in that table is accessed (directly or indirectly), there is no way for the user to bypass security. To protect a table or view with a VPD policy, you have to perform the following general steps:
1. Create a PL/SQL function...