...
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 685
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:
A
Only (a) is true
B
Only (b) is true
C
Both (a) and (b) are true
D
Neither (a) nor (b) are true
Question 685 Explanation: 
VIEW is a virtual table based on the result set of a SQL statement.
→ In SQL, a view is a virtual table based on the result-set of an SQL statement.
→ A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.
→ You can add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from one single table.
CREATE VIEW Syntax:
CREATE VIEW view_name AS
SELECT column1, column2, …
FROM table_name
WHERE condition;
Note: A view always shows up-to-date data! The database engine recreates the data, using the view’s SQL statement, every time a user queries a view.
Correct Answer: B
Question 685 Explanation: 
VIEW is a virtual table based on the result set of a SQL statement.
→ In SQL, a view is a virtual table based on the result-set of an SQL statement.
→ A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.
→ You can add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from one single table.
CREATE VIEW Syntax:
CREATE VIEW view_name AS
SELECT column1, column2, …
FROM table_name
WHERE condition;
Note: A view always shows up-to-date data! The database engine recreates the data, using the view’s SQL statement, every time a user queries a view.

Leave a Reply

Your email address will not be published. Required fields are marked *