Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

1. What is a view?
a) An brief description of the schema diagram.
b) A relation that is not a part of the schema but is a virtual relation
c) Any relation that is a part of the schema
d) A relation that is a part of the schema but which needs to be specified in every operation made on that particular relation.

View Answer

Answer: b [Reason:] A relation that is not a part of the schema but is a virtual relation is called as view. Views improve writability as viewing the entire logical model is not feasible.

2. What is the command used to define view in SQL?
a) define view
b) new view
c) create view
d) none of the mentioned

View Answer

Answer: c [Reason:] We use the create view command to define a view in SQL.

3. create view studentdet
select ID, address, name
from student;

What is the result of the above query?
a) It creates a view named studentdet with 3 attributes
b) It creates a view named studentdet with 1 attribute
c) It creates a view named ID with 2 attributes
d) It is syntactically wrong and does not give a result

View Answer

Answer: d [Reason:] immediately after specifying the name of the view, we have to write the “as” keyword. So this query does not give any result as it is syntactically incorrect.

4. State true or false: One view can be used in the expression defining another view
a) True
b) False

View Answer

Answer: a [Reason:] One view can be used to define another view in its expression. This further improves the writability of the code as we are reducing the entire logical model.

5. If the actual relations used in the view definition change, the view is updated immediately. Such views are called _________
a) Instant views
b) Instantaneous views
c) Materialistic views
d) Materialized views

View Answer

Answer: d [Reason:] If the actual relations used in the view definition change, the view is updated immediately. Such views are called Materialized views. Materialized views help to keep the database up-to-date.

6. The process of maintaining views up to date is called _________
a) View maintenance
b) View updating
c) View materialization
d) View isolation

View Answer

Answer: a [Reason:] The process of maintaining views up to date is called View maintenance. View maintenance can be done immediately when any of the views is updated.

7. How can we insert data into a view?
a) insert into ();
b) create data values ();
c) enter ();
d) insert into values ();

View Answer

Answer: d [Reason:] We can insert data into a view using the inset into values (); statement. This operation can be done only if the view is updatable.

8. State true or false: We can update a view if it has multiple database relations in the from clause
a) True
b) False

View Answer

Answer: b [Reason:] We can update a view only if it has a single database relation in the “from” clause.

9. The _______ statement makes the updates performed by the transaction permanent.
a) Finalize work
b) Finish work
c) Commit work
d) None of the mentioned

View Answer

Answer: c [Reason:] The Commit work statement makes the updates performed by the transaction permanent. After a transaction is committed, a new transaction is automatically started.

10. The _______ statement causes the statements to undo all the updates performed on the transaction
a) Undo work
b) Rollback work
c) Commit work
d) Replace work

View Answer

Answer: b [Reason:] The Rollback work statement causes the statements to undo all the updates performed on the transaction. The database is then restored to the state of what it was before the first statement of the transaction was executed.