20.07.2013 Views

Beginning SQL

Beginning SQL

Beginning SQL

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12<br />

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

In today’s world, the security of the data in your database is a primary concern. Privacy concerns<br />

and laws often make exposure of corporate data a catastrophic problem. Exposure of personal<br />

information such as social security numbers or medical information can bring costly lawsuits or<br />

even government fines and litigation. In the Internet age, the theft or exposure of such information<br />

can be performed from half a world away. No longer can you just lock the door to the server and<br />

remove the floppy disks from the workstations and consider yourself secure. The security issues<br />

that you must deal with in the database world involve who can see what when, and they break<br />

down into a handful of basic situations:<br />

❑ The data in a specific table should be accessible to some users but not others.<br />

❑ Some users should be able to modify particular tables, but other users should not.<br />

❑ In some instances, access to tables should be broken down into columns of the tables. One<br />

set of users should be able to see columns a, b, and d, while another set of users should be<br />

able to access only columns c, e, and f.<br />

❑ In other instances, the access to tables should be limited by rows. Perhaps department<br />

managers should be able to see data about their department but not data about other<br />

departments.<br />

This chapter describes the methods that <strong>SQL</strong> provides to implement this security.<br />

Security Concepts<br />

Implementing the security system and enforcing the required restrictions are the responsibility of<br />

the DBMS. The <strong>SQL</strong> language implements a security framework and provides a rather basic syntax<br />

used to specify security restrictions. <strong>SQL</strong> grants access to objects by users; it does not restrict<br />

access. In other words, a user cannot perform any action without first being granted the power to<br />

do so.

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

Saved successfully!

Ooh no, something went wrong!