Master PostgreSQL Views and Materialized Views by exploring their creation, management, and use cases. Learn the intricacies of materialized views, including how to refresh and utilize them efficiently.
| Qno | Answer |
|---|---|
| 1 | B) A virtual table based on a query |
| 2 | B) CREATE VIEW |
| 3 | A) Data in the base table changes |
| 4 | B) The view becomes invalid |
| 5 | B) Views can be indexed for better performance |
| 6 | D) Update data in the base table |
| 7 | D) CREATE OR REPLACE VIEW |
| 8 | A) DROP VIEW |
| 9 | B) To simplify complex queries |
| 10 | D) All of the above |
| 11 | A) By allowing selective data access |
| 12 | C) Presenting aggregated data |
| 13 | B) Format data for end-user consumption |
| 14 | B) Simplifies query execution for users |
| 15 | A) Frequently changing data |
| 16 | B) A view that stores data physically |
| 17 | A) It requires storage space |
| 18 | A) CREATE MATERIALIZED VIEW |
| 19 | A) To enhance query performance by storing results |
| 20 | B) They must be refreshed to stay updated |
| 21 | A) Yes, for faster querying |
| 22 | B) When query performance is critical |
| 23 | A) REFRESH MATERIALIZED VIEW |
| 24 | A) It clears its data and reloads from the base query |
| 25 | A) Use the CONCURRENTLY option |
| 26 | A) Allows users to query the view during the refresh process |
| 27 | C) Indexes exist on the base tables |
| 28 | B) Show outdated data |
| 29 | B) Using cron jobs or scheduled tasks |
| 30 | D) Both A and C |