Views
- A ‘virtual table’
- A relation defined in terms of the contents of other tables and views
CREATE VIEW <name> AS <query>
- A table whose values are actually stored in the database is called a ‘base table’
- Triggers on views
- Generally, it is impossible to modify a view because it doesn’t exist
- But an
INSTEAD OF
triggers lets us interpret view modifications as modifications over base tables
- Materialized Views
- Precompute result of a view
- Periodically reconstruction of the materialized views which are otherwise out of date