View Management Flashcards
7 cards from real SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 View Management flashcards as text
An aggregate view using GROUP BY and SUM is typically what kind of view?
Answer: Non-updatable
Views containing aggregation cannot be directly updated because rows do not map one-to-one.
Which command refreshes the stored data of a materialized view in many databases?
Answer: REFRESH MATERIALIZED VIEW
REFRESH MATERIALIZED VIEW re-executes the underlying query and updates the cache.
A view that references another view is best described as a what?
Answer: Nested view
Views can be layered on top of other views, forming nested views.
What is a key benefit of using views to simplify complex joins?
Answer: Users query one named object instead of rewriting the join
Views encapsulate complex logic so users can query a simple name.
Which clause renames the columns exposed by a view?
Answer: Specifying a column list after the view name
Listing column names in CREATE VIEW v (col1, col2) renames output columns.
If a base table column referenced by a view is dropped, what typically happens?
Answer: The view becomes invalid or errors when queried
Removing a column the view depends on breaks the view until redefined.
What does the WITH READ ONLY option on a view enforce?
Answer: No DML can be performed through the view
WITH READ ONLY blocks INSERT, UPDATE, and DELETE through the view.