Processing Queries with Views (cont.)
For materialized views, updates to view data to maintain integrity can be:
- Immediate: triggered by each base relation update
- Deferred: allows temporary inconsistency in DB:
- Lazy: Refresh views only as needed by queries
- Faster updates
- Slower queries
- Periodic: Refresh views every n seconds (called snapshots)
- Forced: Refresh views after every n updates to base tables
Query is processed as if view were a physically stored relation.