Recall & Review
beginner
What is a view in a database?
A view is like a saved query that looks like a table. It shows data from one or more tables but does not store data itself.
Click to reveal answer
beginner
How do you create a simple view in MySQL?
Use the syntax: <br>CREATE VIEW view_name AS SELECT column1, column2 FROM table_name WHERE condition;
Click to reveal answer
intermediate
Can you update data through a view?
Sometimes yes, if the view is simple and directly maps to one table. Complex views with joins or aggregations usually cannot be updated.
Click to reveal answer
beginner
Why use views instead of tables?
Views help simplify complex queries, hide sensitive data, and provide a consistent interface to data without duplicating it.
Click to reveal answer
intermediate
What happens if you drop a table that a view depends on?
The view will stop working because it depends on that table's data. You must drop or recreate the view after dropping the table.
Click to reveal answer
Which SQL command creates a view?
✗ Incorrect
The CREATE VIEW command is used to create a view in SQL.
A view stores data separately from the tables it uses. True or False?
✗ Incorrect
Views do not store data themselves; they show data from underlying tables.
Which of these is a benefit of using views?
✗ Incorrect
Views simplify complex queries by saving them as reusable virtual tables.
Can you create a view that joins multiple tables?
✗ Incorrect
Views can include joins from multiple tables to combine data.
What happens if you try to update data through a complex view with joins?
✗ Incorrect
Complex views with joins usually cannot be updated directly.
Explain what a view is and why you might use one in a database.
Think about how views help you see data without copying it.
You got /5 concepts.
Describe the basic steps and syntax to create a view in MySQL.
Remember the command starts with CREATE VIEW followed by a SELECT query.
You got /5 concepts.