Which of the following is/are true with reference to ‘view’ in DBMS ? (a) A…

2017

Which of the following is/are true with reference to ‘view’ in DBMS ?

(a) A ‘view’ is a special stored procedure executed when certain event occurs.

(b) A ‘view’ is a virtual table, which occurs after executing a pre-compiled query.

Code :

  1. A.

    Only (a) is true

  2. B.

    Only (b) is true

  3. C.

    Both (a) and (b) are true

  4. D.

    Neither (a) nor (b) are true

Attempted by 50 students.

Show answer & explanation

Correct answer: B

Answer: Only (b) is true.

Explanation: A view is a virtual table defined by a stored SELECT query. It does not normally store data itself; when you access the view the DBMS executes the underlying SELECT and returns the result.

  • Why the first statement is incorrect: the description 'a special stored procedure executed when certain event occurs' matches a trigger (or an event-driven stored procedure), not a view.

  • Why the second statement is correct: a view is defined by a SELECT query (for example, using CREATE VIEW) and behaves like a virtual table when queried.

  • Note: materialized views are an exception—they store the query result on disk for performance. Regular views are virtual and do not persist the data.

  • Example: CREATE VIEW view_name AS SELECT column1, column2 FROM table_name WHERE condition;

Explore the full course: Tpsc Assistant Technical Officer