Chapter Summary


This chapter covered a lot of material related to implementing views. To ensure that you picked up on the most important points, take a quick look at them.

KEY TERMS

  • ALTER VIEW

  • distributed partitioned view

  • DROP VIEW

  • local partitioned view

  • partitioned view

  • CREATE VIEW

  • WITH ENCRYPTION

  • WITH SCHEMABINDING

You saw that views resemble tables in concept and many operations that you execute against tables can also be executed against views. These include SELECT , INSERT , UPDATE , and DELETE statements. The one major difference between views and tables was that views refer to tables, and do not actually contain their own data. A view could be related to a television set; it doesn't actually store movies but makes it possible for you to view them remotely.

You saw that the CREATE VIEW statement defines the view, and saw that it is based on a SELECT statement, with some restrictions. The basic function of the statement is to define the range of data ( columns and rows) that should be displayed from the table or tables used in the view. You also saw that many advanced features of the SELECT statement, such as joins and aggregates, carry over to views.

Data modification with views introduced several restrictions that prevent many types of modifications ( INSERT , UPDATE , and DELETE ) from happening. You were introduced to the WITH CHECK OPTION , which further restricts what you can do. These restrictions serve two purposes: they enable you to validate the data you enter and to make restrictions to prevent unwanted data modifications.

The next topic was ownership chains. You learned that if the same person owns a series of objects, such as views and the base tables, then she has to grant permissions to only the upper-layer objects or views. This is designed to make administration easier. You also learned what happens if you don't own all the objects, and what is required to grant access to the data. Object ownership should be limited to a single user : dbo.

Data access performance was dealt with when you examined what partitioned views are. You learned that partitioned views can be local to one server or distributed across many servers. Two main items you had to remember about partitioned views were the use of CHECK constraints (to define what data is found in what table) and the view (which is created using the UNION ALL operator).



MCSE Training Guide (70-229). Designing and Implementing Databases with MicrosoftR SQL ServerT 2000 Enterprise Edition
MCSE Training Guide (70-229). Designing and Implementing Databases with MicrosoftR SQL ServerT 2000 Enterprise Edition
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 228

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net