CIS 407 chapter 13

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which statement do you use to modify an existing view? UPDATE WITH SCHEMABINDING CREATE VIEW ALTER VIEW

ALTER VIEW

Which statement do you use to delete an existing view? CREATE VIEW ALTER VIEW DROP VIEW DELETE VIEW

DROP VIEW

Which of the following should you use to select the columns for a view in the View Designer? SQL pane Results pane Diagram pane Criteria pane

Diagram pane

A view is a/an ________________ statement that's stored as an object in the database. SELECT UPDATE INSERT DELETE

SELECT

Which of the following should you use to view the code that's generated for a view in the View Designer? SQL pane Results pane Diagram pane Criteria pane

SQL pane

Which of the following can you use to create or modify a view in SQL Server Management Studio? Diagram pane Criteria pane View Designer Query Designer

View Designer

Each of the following is a benefit provided by using views except for one. Which one is it? You can simplify data retrieval by hiding multiple join conditions. You can provide secure access to data by creating views that provide access only to certain columns or rows. You can create a view that simplifies data insertion by hiding a complex INSERT statement within the view. You can create custom views to accommodate different needs.

You can create a view that simplifies data insertion by hiding a complex INSERT statement within the view.

A table that's used to create a view is called a view table a base table a temporary table an OFFSET table

a base table

All of the system objects that define a database are stored in a system catalog a catalog view an information schema view a derived view

a system catalog

The WITH SCHEMABINDING clause of the CREATE VIEW statement protects the view by binding it to the database schema prevents the tables that the view is based on from being deleted prevents the tables that the view is based on from being modified in a way that affects the view all of the above

all of the above

You can code views that join tables summarize data use subqueries and functions all of the above

all of the above

The SELECT statement for a view can't use an ORDER BY clause can include the INTO keyword can use the ORDER BY clause if it also uses the TOP clause can't use the ORDER BY clause with the OFFSET and FETCH clauses

can use the ORDER BY clause if it also uses the TOP clause

One way to examine the system objects that define a database is to use catalog views base views derived views none of the above

catalog views

By default, columns from different tables with the same name do not have to be renamed columns in a view are given the same names as the columns in the base tables calculated columns do not need to be named in the SELECT statement all of the above

columns in a view are given the same names as the columns in the base tables

The WITH CHECK option of the CREATE VIEW statement prevents users from using the view without the appropriate authorization prevents an update from being performed through the view if it causes a row to no longer be included in the view prevents rows from being deleted through the view prevents rows from being inserted through the view

prevents an update from being performed through the view if it causes a row to no longer be included in the view

The WITH ENCRYPTION clause of the CREATE VIEW statement prevents users from modifying the view prevents users from seeing the code that defines the view prevents users from using the view without the appropriate authorization causes the data that's returned by the view to be encrypted

prevents users from seeing the code that defines the view

The statement CREATE VIEW Example3 AS SELECT * FROM Invoices; will create an updatable view will create a read-only view will fail because the * operator isn't allowed will create a view through which you can delete rows, but not insert or update rows

will create an updatable view

The statement CREATE VIEW Example1 AS SELECT VendorName, SUM(InvoiceTotal) AS SumOfInvoicesFROM Vendors JOIN Invoices ON Vendors.VendorID = Invoices.VendorIDGROUP BY VendorNameORDER BY VendorName; will fail because the GROUP BY clause isn't allowed in this view will fail because the column alias SumOfInvoices is invalid will fail because the ORDER BY clause isn't allowed in this view will succeed

will fail because the ORDER BY clause isn't allowed in this view

The statement CREATE VIEW Example4 AS SELECT * FROM Invoices JOIN Vendors ON Invoices.VendorID = Vendors.VendorIDWHERE InvoiceTotal - PaymentTotal - CreditTotal > 0; will create an updatable view will create a read-only view will create a view through which you can update or insert rows, but not delete rows will fail because the SELECT statement returns two columns named VendorID

will fail because the SELECT statement returns two columns named VendorID

The statement CREATE VIEW Example2 AS SELECT InvoiceNumber, DATEDIFF(day,InvoiceDate,InvoiceDueDate)FROM Invoices; will create an updatable view will create a read-only view because of a calculated value will fail because the second column isn't named will create a view through which you can delete rows, but not insert or update rows

will fail because the second column isn't named


Kaugnay na mga set ng pag-aaral

Ch. 14 Nursing mgmt during labor

View Set

2.1 Texas Requirements to Become an Appraiser

View Set

Ch 26 Fluid, Electrolyte, and Acid-Base Balance (Marieb) - Mutliple Choice Set

View Set

Pharmacokinetics 5: Time Course of Drug Responses

View Set

intro to phil hales bloomu final review

View Set

Chapter 55: PrepU - Nursing Management: Critical Care

View Set

13 Arterial Blood Collection/MEP

View Set