Difficulty: Easy
Correct Answer: to define a view of one or more tables or views
Explanation:
Introduction / Context:
Views are saved query definitions that present data from one or more base tables (or other views) as a virtual table. They are crucial for abstraction, security, reuse, and simplifying complex joins or filters for application use.
Given Data / Assumptions:
Concept / Approach:
The command CREATE VIEW establishes a virtual table whose result set derives from a SELECT statement. Developers use views to encapsulate business logic, expose only necessary columns, enforce row-level filtering, and stabilize application interfaces even when base schemas evolve. Views can also aid permission systems by granting access to a view while restricting base tables.
Step-by-Step Solution:
Verification / Alternative check:
DBMS documentation consistently defines views as named queries; recompilation and triggers are separate features (e.g., ALTER VIEW, CREATE TRIGGER).
Why Other Options Are Wrong:
Common Pitfalls:
Assuming views always materialize data; unless explicitly materialized, a view is virtual and derives rows on demand.
Final Answer:
to define a view of one or more tables or views
Discussion & Comments