Views(Engineering > Computer Science And Engineering > Dbms Questions And Answers ) Questions and Answers
Question 1. Which of the following creates a virtual relation for storing the query ?
Function
View
Procedure
None of the mentioned
Explanation:-
Answer: Option B. -> View
ViewAny such relation that is not part of the logical model, but is made visible to a user as a virtual relation, is called a view.
Question 2. Updating the value of the view
Will affect the relation from which it is defined
Will not change the view definition
Will not affect the relation from which it is defined
Cannot determine
Explanation:-
Answer: Option A. -> Will affect the relation from which it is defined
Will affect the relation from which it is defined
Question 3. SQL view is said to be updatable (that is, inserts, updates or deletes can be applied on the view) if which of the following conditions are satisfied by the query defining the view?
The from clause has only one database relation.
The query does not have a group by or having clause.
The select clause contains only attribute names of the relation, and does not have any expressions, aggregates, or distinct specification.
All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned
All of the mentionedAll of the conditions must be satisfied to update the view in sql.
Question 4. Which of the following is the syntax for views where v is view name ?
Create view v as query name";
Create query expression" as view;
Create view v as query expression";
Create view query expression";
Explanation:-
Answer: Option B. -> Create query expression" as view;
Create view v as "query expression;is any legal query expression. The view name is represented by v
Question 5. Materialised views make sure that
View definition is kept stable
View definition is kept up-to-date
View definition is verified for error
View is deleted after specified time
Explanation:-
Answer: Option B. -> View definition is kept up-to-date
View definition is kept up-to-date
Question 6. Which of the following is used at the end of the view to reject the tuples which do not satisfy the condition in where clause ?
With
Check
With check
All of the mentioned
Explanation:-
Answer: Option C. -> With check
With checkViews can be defined with a with check option clause at the end of the view definition; then, if a tuple inserted into the view does not satisfy the view's where clause condition, the insertion is rejected by the database system.