Database Reference
In-Depth Information
F IGURE 11.1
The customer table from the Mountain View Music database
promised, but also this table contains the passwords customers use when
they log on to the Mountain View Music Web site. For these reasons we
need tight controls that limit who and what can access this table.
For example, let's say that all the customer service employees need to
be able to read and write to tbl_customer. If you grant them all read and
write access to the table, they will be able to read and write all the data in
the table. This means that they can see the password, even if it's encrypted.
Why let them see it and have the opportunity to change it and affect your
customers?
We know what you might be thinking: Permissions can be applied on
a column basis, and thus you could prevent them from seeing this infor-
mation. Although that is true, have you ever tried to manage security to this
level? It can be a pain to keep track of who has access to what. Instead, you
can create a view as follows.
CREATE VIEW vw_customer_detail
AS
SELECT email
,customer_id
,firstname
,lastname
,homephone
,workphone
,mobilephone
FROM tbl_customer
 
Search WWH ::




Custom Search