Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Take Test: 2. Chapter 13 Quiz - Click here Content Question 1 Which command will

ID: 3580156 • Letter: T

Question

Take Test: 2. Chapter 13 Quiz - Click here

Content

Question 1

Which command will delete a view?

a.

ALTER TABLE...DROP VIEW

b.

ALTER TABLE...DELETE VIEW

c.

DROP VIEW

d.

DELETE VIEW

0.1 points

Question 2

Which type of view is created with the following command?

  CREATE VIEW inventory AS SELECT isbn, title, retail price

FROM books

WITH READ ONLY;

a.

derived

b.

inline

c.

complex

d.

simple

0.1 points

Question 3

A user can perform a DML operation (add, modify, delete) on a simple view if it does not violate which type of existing constraint on the underlying base table?

a.

PRIMARY KEY

b.

WITH CHECK OPTION

c.

UNIQUE

d.

all of the above

0.1 points

Question 4

A(n) ____ stores a query and is used to access data in the underlying tables.

a.

argument

b.

function

c.

view

d.

constraint

0.1 points

Question 5

If a view was created with the WITH READ ONLY constraint, to remove the constraint you will need to ____.

a.

re-create the view without the option

b.

use the ALTER VIEW command

c.

drop the option

d.

rename the view

0.1 points

Question 6

If you want to create a view based upon a table or tables that do not yet exist, or are currently unavailable (e.g.,off-line), what keyword can you use to avoid receiving an error message?

a.

OVERRIDE

b.

none of the above

c.

FORCE

d.

NOERROR

0.1 points

Question 7

What is the definition of an inline view?

a.

It is a temporary data source that exists only while a command is being executed.

b.

It is a permanent database object that can be referenced by subsequent queries.

c.

It is a view that retrieves data from one or more tables, and can contain functions and grouped data.

d.

It is a temporary pseudo column.

0.1 points

Question 8

Which constraint ensures that the data in a view cannot be changed?

a.

NO WRITE OPTION

b.

WITH READ ONLY

c.

WITH CHECK OPTION

d.

WITH READ OPTION

0.1 points

Question 9

Which of the following statements about complex views is incorrect?

a.

It retrieves or derives data from one or more tables.

b.

All DML operations can be performed on complex views, just like simple views.

c.

It is created with the same CREATE VIEW command as a simple view.

d.

It may contain functions or grouped data.

0.1 points

Question 10

Which of the following statements about views is incorrect?

a.

Views restrict users' access to sensitive data.

b.

Views assist users who do not have the training to issue complex SQL inquiries.

c.

A view can be referenced in a SELECT...FROM statement, just like any table.

d.

Views are database objects that actually store data.

0.1 points

Question 11

Which of the following statements is incorrect?

a.

A view cannot be given the same name as another database object in the same schema.

b.

Views can be modified by using the ALTER VIEW...MODIFY command.

c.

A view can be created with the CREATE VIEW command.

d.

A view cannot be modified; if you need to change it, you must use the CREATE OR REPLACE VIEW keywords.

0.1 points

Question 12

Which of the following types of views cannot include an arithmetic expression?

a.

simple view

b.

all of the above

c.

complex view

d.

inline view

0.1 points

Question 13

Which type of view is created with the following command?

CREATE VIEW outstanding

AS SELECT customer#, order#, orderdate, shipdate

FROM orders

WHERE shipdate IS NULL

WITH CHECK OPTION;

a.

complex

b.

none of the above

c.

partial

d.

simple

0.1 points

Question 14

The type of view that actually replicates data is called a(n) ____ view.

a.

simple

b.

complex

c.

materialized

d.

inline

0.1 points

Question 15

DML operations are not allowed on a view that is created with the ____ keyword.

a.

DISTINCT

b.

JOIN

c.

NATURAL JOIN

d.

REPLACE

a.

ALTER TABLE...DROP VIEW

b.

ALTER TABLE...DELETE VIEW

c.

DROP VIEW

d.

DELETE VIEW

Explanation / Answer

1) DROP VIEW view_name is used for deleting a view

2) The following view takes reference from only ONE table and doesnt include group functions.So the view is SIMPLE VIEW

3)It must not violate any of the given constraints so the answer s ALL THE ABOVE

4) VIEW is used to store a query and access datat in underlying tables

5)We can use the alter view command to remove readonly option (Ex:alter table employee read write;) this command is used to remove read only

8) WITH READ ONLY is used to restrict any modifications for the view.