Interview
A view is a saved SELECT with a name. CREATE VIEW fail_list AS SELECT name, marks FROM students WHERE marks < 40; Then SELECT * FROM fail_list; looks like a table but it runs that query each time (simple views).
Teachers like views for ‘show only what this role should see’. You don’t copy data. If students.marks changes, fail_list changes.
Some views are not updatable (JOIN, GROUP BY). INSERT into fail_list may fail. Don’t promise ‘views always write back’.
Trap — thinking a view stores a snapshot forever. Unless you made a table, it is a query with a nickname.
On the example next to this theory: Interview: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.
CREATE VIEW fail_list AS SELECT … WHERE marks < 40;