OraQA

Oracle Question and Answer

  • Do you have a solution to a problem? Do you have an unanswered question? Login and share it with the Oracle community. More...

Oracle News


Entries RSS feed

Comments RSS feed

Database Design Question

February 4th, 2008 By biswal.srikant

A table contains information about a company. There is different information about different departments. A user from a department only accesses his department information. But an administrator can access the information of any department.

Example:

UserTable (userId, userName, userType, departmentId)
DepartmentTable (departmentId, departmentName, folderId)
FolderTable (folderId, folderName)

userType: ordinaryUser, Administrator

My question is how ordinaryUser can access same department information only. But administrator can access all department information? What are the constraints to design the above database?

Thanks.

One Response to “Database Design Question”

  1. apc Says:

    If you have an Enterprise Edition licence Oracle 8.1.7.4 or higher then the one and only correct answer is Virtual Private Database AKA row level security.

    Your other alternatives are views and/or programmatic interfaces built out of PL/SQL.

    Cheers, APC

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this question