Deck 13: Views
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/133
Play
Full screen (f)
Deck 13: Views
1
A simple view cannot contain a simple arithmetic operation.
True
2
A view name must be enclosed in single quotation marks if it is referenced in the FROM clause of a SELECT statement.
False
3
Any DML operation can be performed on a simple view that was not created with the WITH READ ONLY option, unless it violates an existing constraint.
True
4
Views are not database objects.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
5
Rows can be updated through a simple view as long as the operation does not violate existing constraints and the view was created with the WITH READ ONLY option.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
6
Column aliases can be used in the subquery to assign new column names to the columns contained in a view.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
7
A complex view can retrieve data from more than one table.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
8
A complex view cannot contain any group functions.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
9
An inline view is a temporary table that only lasts for the duration of the SELECT statement used to create it.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
10
Views can be used to restrict a user's access to sensitive data.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
11
DML operations can be performed through a simple view even if the operation will violate constraints on the underlying table.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
12
A simple view is based upon a subquery that references only one table and doesn't contain any group functions, expressions, or a GROUP BY clause.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
13
The WITH READ ONLY option can be used to prevent changes from being made to the data displayed by the view.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
14
You cannot create a view if the underlying table does not exist at the time the view is created.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
15
A view cannot be given the same name as another database object.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
16
The column names used in the view must be the same names as the column names in the underlying table(s).
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
17
Views are database objects that store data.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
18
A view can be created to simplify issuing complex SQL queries.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
19
A view can be modified using the MODIFY clause of the ALTER VIEW command.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
20
Rows cannot be added to a simple view.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
21
Update operations cannot be performed through a complex view that contains an arithmetic expression.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
22
"TOP-N" analysis is performed by sorting values in ascending or descending order in an inline view.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
23
Values cannot be inserted through a view into columns that are based on arithmetic expressions.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
24
DML operations can be performed on a view created with the DISTINCT keyword.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
25
When a view includes columns from more than one table, updates can only be applied to the table that includes the primary key for the view.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
26
The keyword can be used to create a view based upon a table that has not yet been created. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
27
is the default mode for the CREATE VIEW command. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
28
When a query references a view, the query in the view is processed, and the results are treated as a(n) table. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
29
The keywords prevent DML operations from being performed through a view. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
30
DML operations cannot be performed on a key-preserved table.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
31
An inline view is used to create a(n) table. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
32
A(n) view can contain a GROUP BY clause. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
33
A(n) is a database object, but it does not actually store data. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
34
A view can be thought of as the result of a(n) query. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
35
Rows can be added through a complex view that is based upon grouped data.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
36
Rows in an underlying table cannot be deleted through a complex view that contains an arithmetic operation.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
37
An ORDER BY clause can be used to perform "TOP-N" analysis.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
38
Rows can be deleted through a simple view as long as the operation does not violate existing constraints and the view was created with the WITH READ ONLY option.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
39
The can be used when a view is created to ensure that any DML operations performed on the view will not prevent the row from being accessible by the view at a later time. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
40
A(n) view cannot be modified. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
41
An inline analysis can be used to find the values. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
42
operations cannot be performed on non key-preserved tables through a complex view. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
43
Any operation can be performed on a simple view that was not created with the WITH READ ONLY option, unless it violates an existing constraint. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
44
The UPDATE command cannot be used on a view created with the . _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
45
A(n) ____ stores a query and is used to access data in the underlying tables.
A) view
B) constraint
C) function
D) argument
A) view
B) constraint
C) function
D) argument
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
46
Which of the following statements about views is incorrect?
A) Views assist users who do not have the training to issue complex SQL inquiries.
B) Views restrict users' access to sensitive data.
C) Views are database objects that actually store data.
D) A view can be referenced in a SELECT...FROM statement, just like any table.
A) Views assist users who do not have the training to issue complex SQL inquiries.
B) Views restrict users' access to sensitive data.
C) Views are database objects that actually store data.
D) A view can be referenced in a SELECT...FROM statement, just like any table.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
47
The pseudo column can be used to perform a "TOP-N" analysis. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
48
Which of the following describes a type of view that is based on a subquery that retrieves or derives data from one or more tables, and may also contain functions or grouped data?
A) simple view
B) complex view
C) inline view
D) "TOP-N" analysis
A) simple view
B) complex view
C) inline view
D) "TOP-N" analysis
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
49
cannot be added to a table through a complex view that is based on a group function. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
50
A(n) view can contain data from more than one table. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
51
Which of the following describes a subquery used in a FROM clause to create a "temporary" table that can be referenced by the SELECT and WHERE clauses of the outer query?
A) simple view
B) complex view
C) inline view
D) "TOP-N" analysis
A) simple view
B) complex view
C) inline view
D) "TOP-N" analysis
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
52
A view can be dropped or deleted using the command. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
53
"TOP-N" analysis can be used to find the highest values in a column by sorting the data in order. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
54
A(n) operation can be performed on a complex view that contains an arithmetic operation. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
55
The clause is only necessary if another view may already exist with the same name. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
56
cannot be deleted from a table through a complex view that is based on a group function. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
57
Rows cannot be added to a table through a complex view that was created with the clause. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
58
The operation can be performed through a complex view that contains an arithmetic operation. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
59
Rows cannot be deleted if the complex view was created with a(n) clause. _________________________
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
60
Which of the following describes a type of view that is based upon a subquery that only references one table and does not include any group functions, expressions, or GROUP BY clauses?
A) simple view
B) complex view
C) inline view
D) "TOP-N" analysis
A) simple view
B) complex view
C) inline view
D) "TOP-N" analysis
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
61
Which statement is True about the view created with the following command? CREATE OR REPLACE VIEW inventory
AS SELECT isbn, title, retail price
FROM books;
A) The command creates a complex view.
B) DML operations are not allowed on the data displayed by the view.
C) A database object named INVENTORY may already exist.
D) all of the above
AS SELECT isbn, title, retail price
FROM books;
A) The command creates a complex view.
B) DML operations are not allowed on the data displayed by the view.
C) A database object named INVENTORY may already exist.
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
62
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) simple
B) complex
C) derived
D) inline
FROM books
WITH READ ONLY;
A) simple
B) complex
C) derived
D) inline
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
63
The ____ constraint ensures that any DML operations performed on the view (e.g., adding rows, changing data) will not prevent the row from being accessed by the view because it no longer meets the condition in the WHERE clause.
A) ON UPDATE CHECK
B) WITH CHECK OPTION
C) WITH READ ONLY
D) READ-WRITE ONLY
A) ON UPDATE CHECK
B) WITH CHECK OPTION
C) WITH READ ONLY
D) READ-WRITE ONLY
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
64
Which statement is True about the view created with the following command? CREATE VIEW inventory AS SELECT isbn, title, retail price
FROM books
WITH READ ONLY;
A) The command creates a simple view.
B) DML operations are NOT allowed on the data displayed by the view.
C) A view named INVENTORY did not previously exist.
D) all of the above
FROM books
WITH READ ONLY;
A) The command creates a simple view.
B) DML operations are NOT allowed on the data displayed by the view.
C) A view named INVENTORY did not previously exist.
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
65
Which type of view is created with the following command? CREATE VIEW OR REPLACE outstanding
AS SELECT customer#, order#, orderdate, shipdate
FROM orders
WHERE shipdate IS NULL
WITH READ ONLY;
A) simple
B) complex
C) derived
D) inline
AS SELECT customer#, order#, orderdate, shipdate
FROM orders
WHERE shipdate IS NULL
WITH READ ONLY;
A) simple
B) complex
C) derived
D) inline
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
66
Which of the following types of views cannot contain grouped data?
A) simple
B) complex
C) inline view
D) all of the above
A) simple
B) complex
C) inline view
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
67
Which statement is not True about the view created with the following command? CREATE VIEW inventory
AS SELECT isbn, title, retail price
FROM books;
A) The command creates a simple view.
B) DML operations are not allowed on the data displayed by the view.
C) A view named INVENTORY did not previously exist.
D) all of the above
AS SELECT isbn, title, retail price
FROM books;
A) The command creates a simple view.
B) DML operations are not allowed on the data displayed by the view.
C) A view named INVENTORY did not previously exist.
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
68
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) FORCE
B) NOERROR
C) OVERRIDE
D) none of the above
A) FORCE
B) NOERROR
C) OVERRIDE
D) none of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
69
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
A) PRIMARY KEY
B) WITH CHECK OPTION
C) UNIQUE
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
70
Which of the following types of views cannot include a GROUP BY clause?
A) simple view
B) inline view
C) complex view
D) all of the above
A) simple view
B) inline view
C) complex view
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
71
What is the procedure for assigning new names for the columns that are displayed by a view?
A) The new column names can be listed after the VIEW keyword, enclosed in parentheses.
B) Column aliases can be used in the subquery, and Oracle11g will use the aliases as column names in the view that is created.
C) all of the above
D) none of the above
A) The new column names can be listed after the VIEW keyword, enclosed in parentheses.
B) Column aliases can be used in the subquery, and Oracle11g will use the aliases as column names in the view that is created.
C) all of the above
D) none of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
72
Which statement is True about the view created with the following command? CREATE VIEW OR REPLACE outstanding
AS SELECT customer#, order#, orderdate, shipdate
FROM orders
WHERE shipdate IS NULL
WITH READ ONLY;
A) The order# of an order cannot be changed through the view.
B) The shipping date of an order cannot be changed through the view.
C) No DML operations are permitted through the view.
D) all of the above
AS SELECT customer#, order#, orderdate, shipdate
FROM orders
WHERE shipdate IS NULL
WITH READ ONLY;
A) The order# of an order cannot be changed through the view.
B) The shipping date of an order cannot be changed through the view.
C) No DML operations are permitted through the view.
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
73
Which of the following options will prevent any DML operations from being performed on the underlying table of a view?
A) WITH READ ONLY
B) WITH CHECK ONLY
C) WITH CHECK OPTION
D) NO WRITE OPTION
A) WITH READ ONLY
B) WITH CHECK ONLY
C) WITH CHECK OPTION
D) NO WRITE OPTION
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
74
Which of the following types of views cannot include a group function?
A) simple view
B) inline view
C) complex view
D) all of the above
A) simple view
B) inline view
C) complex view
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
75
____ aren't allowed in the CREATE VIEW command.
A) Arithmetic expressions
B) ORDER BY clauses
C) Group functions
D) GROUP BY clauses
A) Arithmetic expressions
B) ORDER BY clauses
C) Group functions
D) GROUP BY clauses
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
76
Which of the following types of views cannot include an arithmetic expression?
A) simple view
B) inline view
C) complex view
D) all of the above
A) simple view
B) inline view
C) complex view
D) all of the above
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
77
The OR REPLACE clause is not required if ____.
A) another view does not exist with the same name
B) the view is not based on a group function
C) the view does not contain data from more than one table
D) the CREATE command does not specify the WITH CHECK OPTION option
A) another view does not exist with the same name
B) the view is not based on a group function
C) the view does not contain data from more than one table
D) the CREATE command does not specify the WITH CHECK OPTION option
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
78
Which of the following statements is incorrect?
A) A view can be created with the CREATE VIEW command.
B) Views can be modified by using the ALTER VIEW...MODIFY command.
C) A view cannot be modified; if you need to change it, you must use the CREATE OR REPLACE VIEW keywords.
D) A view cannot be given the same name as another database object in the same schema.
A) A view can be created with the CREATE VIEW command.
B) Views can be modified by using the ALTER VIEW...MODIFY command.
C) A view cannot be modified; if you need to change it, you must use the CREATE OR REPLACE VIEW keywords.
D) A view cannot be given the same name as another database object in the same schema.
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
79
Which constraint ensures that the data in a view cannot be changed?
A) WITH CHECK OPTION
B) WITH READ OPTION
C) WITH READ ONLY
D) NO WRITE OPTION
A) WITH CHECK OPTION
B) WITH READ OPTION
C) WITH READ ONLY
D) NO WRITE OPTION
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck
80
What is the default mode for the CREATE VIEW command?
A) COMPILE
B) NOCOMPILE
C) FORCE
D) NOFORCE
A) COMPILE
B) NOCOMPILE
C) FORCE
D) NOFORCE
Unlock Deck
Unlock for access to all 133 flashcards in this deck.
Unlock Deck
k this deck