SQL Views   «Prev 

Characteristics of SQL Views - Quiz

Each question is worth one point. Select the best answer or answers for each question.
1. Which of the following can be characteristic(s) of a view?
Which of the following can be characteristic(s) of a view?
  A. A view can include WHERE statements
  B. A view's definition can be permanently saved in the database as its own object
  C. A view can include joins between more than one table
  D. All of the above

2. Which of the following is/are not good uses for a view?
Which of the following is/are not good uses for a view?
  A. You need to combine two tables logically and be able to update the information repeatedly based on criteria in a SELECT statement
  B. You need the same subset of columns from a table every time you run a given report
  C. You need to select from different tables with a similar query
  D. All of the above are good uses for a view

3. Which of the following is a specific benefit of a view?
Which of the following is a specific benefit of a view?
  A. Speed, because the query results are returned more quickly
  B. Convenience, by having a predefined SELECT statement
  C. Access, because making a view grants the user permission to use the tables
  D. Security, because views can be used to prevent people from updating the database accidentally

4.
StoreID StoreName StoreLocation
InvoiceID StoreID InvoiceAmount
Is the following view updateable? CREATE VIEW MyView AS SELECT * FROM Stores JOIN Invoices ON Stores.StoreID = Invoices.StoreID
Given the following tables: Stores
  A. Yes, because the tables are in the same database
  B. Yes, because the CREATE VIEW statement references both tables
  C. No, because it is a join view, and there is no way to determine which base table a given write belongs to without an INSTEAD OF trigger
  D. No, because you cannot use a * symbol in this statement