What is a view in a database?

What is a view in a database?

a) A virtual table based on the result of a SELECT query
b) A physical table that stores duplicate data
c) A backup of the database
d) A key that links two tables together

Answer:

a) A virtual table based on the result of a SELECT query

Explanation:

A view is a virtual table in a database, created based on the result of a SELECT query. Views do not store data physically; instead, they dynamically generate data when queried. This allows users to simplify complex queries and abstract underlying table structures.

Views can be used to present data in different formats, restrict access to certain columns or rows, or combine data from multiple tables. Since views are virtual, they are automatically updated when the underlying data changes.

Views are useful for simplifying repetitive queries and for creating customized data representations without altering the underlying table structures.

Reference:

Database Management System MCQ (Multiple Choice Questions)

Scroll to Top