More Views

Speaker Notes

Slide 1:

This slide show presents more information about views.

Slide 2:

Here I created a view from two tables. Once it was created I showed the describe and the data.

Slide 3:

The CREATE OR REPLACE VIEW is very convenient but also should be used carefully so that you do not mistakenly replace a view that you wanted to maintain.

Slide 4:

This view renames the data. I only used one table but the information could have come from multiple tables. Note: If the names were not listed then the SELECT would provide the names. Note also that when listing the columns they need to parallel the names in the select.

Slide 5:

I am now creating a view to update. The view has selected certain columns and certain rows from new_first_pay. The resulting view is called new_payview1.

Slide 6:

Note that advanced techniques are needed if there are multiple table joins to create the view. This example has only one table behind the view.

Slide 7:

This slide simple prepares a view that I can used to update and illustrate the impact on the two tables.

Slide 8:

When the data in the table is updated, the view is automatically updated since the data is retrieved from the tables to create the views.

Slide 9:

This puts a named constraint on the view.

Slide 10:

When changes are made to tables, the view is impacted if records no longer mean view requirements or constraints.

Slide 11:

This offers some measure of data security. The person using this view cannot alter the view.

Slide 12:

Views are easy to create. If they will not be used on an ongoing basis, they should be dropped from the dictionary.