Beginning SQL

Beginning SQL Beginning SQL

marjan.fesb.hr
from marjan.fesb.hr More from this publisher
20.07.2013 Views

You could then give SELECT privileges to vEmployeeSensitive to the usrPayroll user ID. Figure 12-6 illustrates that the user usrPayroll can now view only the person’s name, SSN, and salary fields while hiding address and phone numbers. Horizontal views, on the other hand, allow the user to view all the fields in the table but only for selected sets of records. For example, suppose you had a business rule that states that a department manager should be able to view all personnel information for only the employees in their department. Name Addr City State Zip Phone SSN Salary Age Figure 12-6 Name SSN Select Update Payroll Salary SQL Security Can view & update sensitive info 339

You could then give SELECT privileges to vEmployeeSensitive to the usrPayroll user ID. Figure 12-6<br />

illustrates that the user usrPayroll can now view only the person’s name, SSN, and salary fields while<br />

hiding address and phone numbers.<br />

Horizontal views, on the other hand, allow the user to view all the fields in the table but only for selected<br />

sets of records.<br />

For example, suppose you had a business rule that states that a department manager should be able to<br />

view all personnel information for only the employees in their department.<br />

Name Addr City State Zip Phone SSN Salary Age<br />

Figure 12-6<br />

Name SSN<br />

Select<br />

Update<br />

Payroll<br />

Salary<br />

<strong>SQL</strong> Security<br />

Can view &<br />

update sensitive<br />

info<br />

339

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!