Security

Views provide security by hiding sensitive or irrelevant parts of the database. If permissions are set up properly, the accountant can find out how big an author's check should be, but can't look at the underlying figures or compare his or her own paycheck to a coworker's. You can restrict the accountant's access in the database to just those views that are relevant to accounting. Using views as a security mechanism is discussed in more detail in Chapter 10.

Get Practical SQL Handbook, The: Using SQL Variants, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.