WorksheetsCS10337 - Lecture #12
Total questions: 10
Worksheet time: 5mins
A view in MySQL is a virtual table created from a query and does not store data permanently.
True
False
One benefit of using views is that they always store a separate physical copy of the data.
True
False
Views can simplify complex JOIN queries by encapsulating them into a single reusable object.
True
False
A view that contains DISTINCT, GROUP BY, or UNION is generally not updatable.
True
False
If a view is based on a single table with no GROUP BY, it is typically updatable.
True
False
Which of the following best describes a MySQL view?
A physical copy of a table stored permanently
A virtual table created from a stored SELECT query
A special type of trigger used for auditing
A temporary table that expires after the session ends
Which of the following is a benefit of using views?
They store old and new row values
They replace the need for foreign keys
They simplify complex queries
They prevent users from updating base tables
Which of the following would make a view non-updatable?
The view is based on a single table
The view contains an INNER JOIN with a 1-to-1 mapping
The view contains GROUP BY or DISTINCT
The view contains only simple column selections
Which of the following is TRUE about updating data through updatable views?
Updating a view updates only the view, not the base table
Updating an updatable view will reflect changes in the underlying table
Updatable views must always include at least one JOIN
Updatable views can include aggregates like SUM or COUNT
Which of the following is a requirement for a JOIN-based view to be updatable?
It must include a UNION
It must be based on an OUTER JOIN
It must be an INNER JOIN and update only one base table
It must include at least one calculated column
