Deck 7: Sql for Database Construction and Application Processing

Full screen (f)
exit full mode
Question
When the correct SQL command is used to delete a table's structure,the command can only be used with a table that has already had its data removed.
Use Space or
up arrow
down arrow
to flip the card.
Question
The SQL keyword CONSTRAINT is used to define one of five types of constraints.
Question
The SQL keyword DELETE is used to delete a table's structure.
Question
If the table PRODUCT has a column PRICE,and PRICE has the data type Numeric (8,2),the value 98765 stored in that field will be displayed by the DBMS as 98765.00.
Question
The SQL keyword PRIMARY KEY is used to designate the column(s)that are the primary key for the table.
Question
Rows can be removed from a table by using the SQL DELETE statement.
Question
If the table ITEM has a column WEIGHT,and WEIGHT has the data type Numeric (7,2),the value 4321 with be displayed by the DBMS as 43.21.
Question
The SQL CREATE TABLE statement is used to name a new table and describe the table's columns.
Question
Rows in a table can be changed by using the SQL UPDATE statement.
Question
The SQL keyword CHECK is used to limit column values to specific values.
Question
The SQL keyword UNIQUE is used to define alternative keys.
Question
The SQL keyword CONSTRAINT is used to limit column values to specific values.
Question
Data values to be added to a table are specified by using the SQL VALUES clause.
Question
Unless it is being used to copy data from one table to another,the SQL INSERT statement can be used to insert only a single row into a table.
Question
One advantage of using the CONSTRAINT command to define a primary key is that the database designer controls the name of the constraint.
Question
One or more rows can be added to a table by using the SQL INSERT statement.
Question
The SQL keyword MODIFY is used to change a column value.
Question
The SQL keyword MODIFY is used to change the structure,properties or constraints of a table.
Question
The SQL keyword CONSTRAINT is used in conjunction with the SQL keywords PRIMARY KEY and FOREIGN KEY.
Question
The SQL SET keyword is used to specify a new value when changing a column value.
Question
SQL views can be used to hide columns.
Question
SQL triggers use the ANSI SQL keywords BEFORE,INSTEAD OF,and AFTER.
Question
A stored program that is attached to a table or view is called a stored procedure.
Question
The Oracle DBMS supports the SQL BEFORE trigger.
Question
SQL views are updatable when the view is based on a single table with no computed columns,and all non-null columns are present in the view.
Question
An SQL virtual table is called a view.
Question
Because SQL statements are table-oriented,whereas programs are variable-oriented,the results of SQL statements used in programs are treated as pseudofiles.
Question
Because SQL statements are table-oriented,whereas programs are variable-oriented,the results of SQL statements used in programs are accessed using an SQL cursor.
Question
SQL views are constructed from SELECT statements.
Question
SQL views can be used to provide a level of insulation between data processed by applications and the data actually stored in the database tables.
Question
According to the SQL-92,statements used to construct views cannot contain the WHERE clause.
Question
SQL triggers can be used with SQL operations INSERT,UPDATE,and DELETE.
Question
The values in an SQL view are not always changeable through the view itself.
Question
SQL triggers are used for providing default values,validity checking,updating views,and performing referential integrity actions.
Question
The SQL command CREATE USER VIEW is used to create a virtual table.
Question
The values in an SQL view are always changeable through the view itself.
Question
A set of SQL statements stored in an application written in a standard programming language is called embedded SQL.
Question
SQL triggers can be used when the DBMS receives an INSERT request.
Question
If the values in an SQL view are changeable through the view itself,the SQL command UPDATE is used to change the values.
Question
The SQL command SELECT is used to retrieve view instances.
Question
Which of the following illustrates the authors' preferred style of defining a primary key?

A)CREATE TABLE CUSTOMER (
CustomerID Integer Primary Key
LastName Char(35)Not Null
First Name Char(25)Null
B)CREATE TABLE CUSTOMER (
CustomerID Integer Not Null
LastName Char(35)Not Null
First Name Char(25)Null
CONSTRAINT CustomerPK PRIMARY KEY (CustomerID)
C)CREATE TABLE CUSTOMER (
CustomerID Integer Not Null
LastName Char(35)Not Null
First Name Char(25)Null
D)either B or C
E)The authors do not demonstrate a preference for how to define a primary key.
Question
SQL triggers are created using the SQL ADD TRIGGER statement.
Question
SQL triggers can be used when the DBMS receives an insert request.
Question
One advantage of using the CONSTRAINT phrase to define a primary key is that the database designer controls the ________.

A)name of the primary key
B)name of the foreign key
C)name of the constraint
D)A and B
E)A,B,and C
Question
Which SQL keyword is used to name a new table and describe the table's columns?

A)SET
B)CREATE
C)SELECT
D)ALTER
E)CONSTRAINT
Question
Which SQL keyword is used to delete a table's structure?

A)DELETE
B)DROP
C)DISPOSE
D)ALTER
E)MODIFY
Question
When a trigger is fired,the DBMS makes the appropriate data available to the trigger code.
Question
Stored procedures have the advantage of greater security,decreased network traffic,SQL optimized by the DBMS compiler,and code sharing.
Question
The SQL Server DBMS supports the SQL BEFORE trigger.
Question
A stored program that is stored within the database and compiled when used is called a trigger.
Question
If the table PRODUCT has a column PRICE that has the data type Numeric (8,2),the value 12345 will be displayed by the DBMS as ________.

A)123.45
B)12345
C)12345.00
D)123450.00
E)00012345
Question
Unlike application code,stored procedures are never distributed to the client computers.
Question
The SQL keyword used to limit column values to specific values is ________.

A)CONSTRAINT
B)CHECK
C)NOT NULL
D)UNIQUE
E)UPDATE
Question
Because SQL stored procedures allow and encourage code sharing among developers,stored procedures give database application developers the advantages of less work,standardized processing,and specialization among developers.
Question
Given the SQL statement
CREATE TABLE SALESREP (
SalesRepNo int NOT NULL,
RepName char(35)NOT NULL,
HireDate date NOT NULL,
CONSTRAINT SalesRepPK PRIMARY KEY (SalesRepNo),
CONSTRAINT SalesRepAK1 UNIQUE (RepName)
);
We know that ________.

A)RepName is the primary key
B)RepName is a foreign key
C)RepName is a candidate key
D)RepName is a surrogate key
E)None of the above is true
Question
To set a column value to an initial value that is selected according to some business logic,you would use the SQL DEFAULT constraint with the CREATE TABLE command.
Question
Which SQL keyword is used to change the structure,properties or constraints of a table?

A)SET
B)CREATE
C)SELECT
D)ALTER
E)CONSTRAINT
Question
If the values in an SQL view are not changeable through the view itself,you may still be able to update the view by using unique application logic.In this case,the specific logic is placed in an INSTEAD OF trigger.
Question
Which SQL keyword is used to impose restrictions on a table,data or relationship?

A)SET
B)CREATE
C)SELECT
D)ALTER
E)CONSTRAINT
Question
If a trigger is being written to enforce referential integrity actions,you cannot use an INSTEAD OF trigger.
Question
Which SQL statement is used to retrieve view instances?

A)CREATE
B)DELETE
C)INSERT
D)SELECT
E)UPDATE
Question
When the correct SQL command is used to delete a table's structure,what happens to the data in the table?

A)If the deleted table was a parent table,the data is added to the appropriate rows of the child table.
B)If the deleted table was a child table,the data is added to the appropriate rows of the parent table.
C)The data in the table is also deleted.
D)Nothing because there was no data in the table since only an empty table can be deleted.
E)A and B
Question
Which SQL keyword is used to add one or more rows of data to a table?

A)DELETE
B)INSERT
C)SELECT
D)SET
E)UPDATE
Question
An SQL virtual table is called ________.

A)a CHECK constraint
B)a view
C)embedded SQL
D)a trigger
E)a stored procedure
Question
Which SQL keyword is used to change one or more rows in a table?

A)MODIFY
B)INSERT
C)SELECT
D)CHANGE
E)UPDATE
Question
Based on the tables below,which of the following SQL statements would increase the balance of the Gonzales account by $100 to a total of $450? GENERAL SALES DATABASE:
SALESREP
<strong>Based on the tables below,which of the following SQL statements would increase the balance of the Gonzales account by $100 to a total of $450? GENERAL SALES DATABASE: SALESREP   CUSTOMER  </strong> A)SELECT Gonzales FROM CUSTOMER INSERT VALUES PLUS (100)INTO Balance; B)SELECT Gonzales FROM CUSTOMER INSERT VALUES (450)INTO Balance; C)INSERT INTO CUSTOMER VALUES PLUS (100) SELECT Balance WHERE CustName = 'Gonzales'; D)INSERT INTO CUSTOMER VALUES (450) SELECT Balance WHERE CustName = 'Gonzales'; E)UPDATE CUSTOMER SET Balance = 450 WHERE CustName = 'Gonzales'; <div style=padding-top: 35px>
CUSTOMER
<strong>Based on the tables below,which of the following SQL statements would increase the balance of the Gonzales account by $100 to a total of $450? GENERAL SALES DATABASE: SALESREP   CUSTOMER  </strong> A)SELECT Gonzales FROM CUSTOMER INSERT VALUES PLUS (100)INTO Balance; B)SELECT Gonzales FROM CUSTOMER INSERT VALUES (450)INTO Balance; C)INSERT INTO CUSTOMER VALUES PLUS (100) SELECT Balance WHERE CustName = 'Gonzales'; D)INSERT INTO CUSTOMER VALUES (450) SELECT Balance WHERE CustName = 'Gonzales'; E)UPDATE CUSTOMER SET Balance = 450 WHERE CustName = 'Gonzales'; <div style=padding-top: 35px>

A)SELECT Gonzales
FROM CUSTOMER
INSERT VALUES PLUS (100)INTO Balance;
B)SELECT Gonzales
FROM CUSTOMER
INSERT VALUES (450)INTO Balance;
C)INSERT INTO CUSTOMER VALUES PLUS (100)
SELECT Balance
WHERE CustName = 'Gonzales';
D)INSERT INTO CUSTOMER VALUES (450)
SELECT Balance
WHERE CustName = 'Gonzales';
E)UPDATE CUSTOMER
SET Balance = 450
WHERE CustName = 'Gonzales';
Question
Which keyword is used to remove one or more rows from a table?

A)DELETE
B)INSERT
C)ERASE
D)SET
E)UPDATE
Question
The SQL command used to create a virtual table is ________.

A)CREATE VTABLE
B)CREATE VIEW
C)VTABLE
D)VIEW
E)NEWLOOK
Question
SQL views are always updatable when ________.

A)the view is based on a single table with no computed columns,and all non-null columns are present in the view
B)the view is based on any number of tables,with or without computed columns,and the INSTEAD OF trigger is defined for the view
C)the view is based on multiple tables,the update is being done on the most subordinate table,and the rows of that table can be uniquely identified
D)A and B
E)A,B,and C
Question
According to the SQL-92,statements used to construct views cannot contain ________.

A)the SELECT clause
B)the FROM clause
C)the WHERE clause
D)the ORDER BY clause
E)SQL view statements can use all of the listed clauses.
Question
Which SQL keyword is used to change the values of an entire column?

A)CHANGE
B)INSERT
C)SELECT
D)SET
E)MODIFY
Question
SQL views are used ________.

A)to hide columns
B)to show results of computed columns
C)to hide complicated SQL statements
D)to provide a level of indirection between data processed by applications and the data actually stored in the database tables
E)SQL views are used for all of the above.
Question
Because SQL statements are table-oriented,whereas programs are element-oriented,the results of SQL statements used in programs are accessed using ________.

A)standard programming tools
B)custom written programming tools
C)an SQL cursor
D)an SQL trigger
E)an SQL stored procedure
Question
A stored program that is attached to a table or view is called ________.

A)a CHECK constraint
B)a view
C)embedded SQL
D)a trigger
E)a stored procedure
Question
Because SQL statements are set-oriented,whereas programs are element-oriented,the results of SQL statements used in programs are treated as ________.

A)tables
B)columns
C)rows
D)files
E)pseudofiles
Question
Which of the following is not an ANSI SQL trigger?

A)BEFORE UPDATE
B)INSTEAD OF UPDATE
C)BEFORE INSERT
D)INSTEAD OF CONSTRAINT
E)AFTER DELETE
Question
SQL views are constructed from ________.

A)CREATE statements
B)INSERT statements
C)UPDATE statements
D)SELECT statements
E)VIEW statements
Question
A set of SQL statements stored in an application written in a standard programming language is called ________.

A)a CHECK constraint
B)a view
C)embedded SQL
D)a trigger
E)a stored procedure
Question
If the values in an SQL view are changeable through the view itself,which SQL statement is used to change the values?

A)CREATE
B)DELETE
C)INSERT
D)SELECT
E)UPDATE
Question
Which of the following is an SQL trigger Oracle supports?

A)BEFORE
B)INSTEAD OF
C)AFTER
D)B and C only
E)A,B,and C
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/100
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 7: Sql for Database Construction and Application Processing
1
When the correct SQL command is used to delete a table's structure,the command can only be used with a table that has already had its data removed.
False
2
The SQL keyword CONSTRAINT is used to define one of five types of constraints.
True
3
The SQL keyword DELETE is used to delete a table's structure.
False
4
If the table PRODUCT has a column PRICE,and PRICE has the data type Numeric (8,2),the value 98765 stored in that field will be displayed by the DBMS as 98765.00.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
5
The SQL keyword PRIMARY KEY is used to designate the column(s)that are the primary key for the table.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
6
Rows can be removed from a table by using the SQL DELETE statement.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
7
If the table ITEM has a column WEIGHT,and WEIGHT has the data type Numeric (7,2),the value 4321 with be displayed by the DBMS as 43.21.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
8
The SQL CREATE TABLE statement is used to name a new table and describe the table's columns.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
9
Rows in a table can be changed by using the SQL UPDATE statement.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
10
The SQL keyword CHECK is used to limit column values to specific values.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
11
The SQL keyword UNIQUE is used to define alternative keys.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
12
The SQL keyword CONSTRAINT is used to limit column values to specific values.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
13
Data values to be added to a table are specified by using the SQL VALUES clause.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
14
Unless it is being used to copy data from one table to another,the SQL INSERT statement can be used to insert only a single row into a table.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
15
One advantage of using the CONSTRAINT command to define a primary key is that the database designer controls the name of the constraint.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
16
One or more rows can be added to a table by using the SQL INSERT statement.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
17
The SQL keyword MODIFY is used to change a column value.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
18
The SQL keyword MODIFY is used to change the structure,properties or constraints of a table.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
19
The SQL keyword CONSTRAINT is used in conjunction with the SQL keywords PRIMARY KEY and FOREIGN KEY.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
20
The SQL SET keyword is used to specify a new value when changing a column value.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
21
SQL views can be used to hide columns.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
22
SQL triggers use the ANSI SQL keywords BEFORE,INSTEAD OF,and AFTER.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
23
A stored program that is attached to a table or view is called a stored procedure.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
24
The Oracle DBMS supports the SQL BEFORE trigger.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
25
SQL views are updatable when the view is based on a single table with no computed columns,and all non-null columns are present in the view.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
26
An SQL virtual table is called a view.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
27
Because SQL statements are table-oriented,whereas programs are variable-oriented,the results of SQL statements used in programs are treated as pseudofiles.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
28
Because SQL statements are table-oriented,whereas programs are variable-oriented,the results of SQL statements used in programs are accessed using an SQL cursor.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
29
SQL views are constructed from SELECT statements.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
30
SQL views can be used to provide a level of insulation between data processed by applications and the data actually stored in the database tables.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
31
According to the SQL-92,statements used to construct views cannot contain the WHERE clause.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
32
SQL triggers can be used with SQL operations INSERT,UPDATE,and DELETE.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
33
The values in an SQL view are not always changeable through the view itself.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
34
SQL triggers are used for providing default values,validity checking,updating views,and performing referential integrity actions.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
35
The SQL command CREATE USER VIEW is used to create a virtual table.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
36
The values in an SQL view are always changeable through the view itself.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
37
A set of SQL statements stored in an application written in a standard programming language is called embedded SQL.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
38
SQL triggers can be used when the DBMS receives an INSERT request.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
39
If the values in an SQL view are changeable through the view itself,the SQL command UPDATE is used to change the values.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
40
The SQL command SELECT is used to retrieve view instances.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
41
Which of the following illustrates the authors' preferred style of defining a primary key?

A)CREATE TABLE CUSTOMER (
CustomerID Integer Primary Key
LastName Char(35)Not Null
First Name Char(25)Null
B)CREATE TABLE CUSTOMER (
CustomerID Integer Not Null
LastName Char(35)Not Null
First Name Char(25)Null
CONSTRAINT CustomerPK PRIMARY KEY (CustomerID)
C)CREATE TABLE CUSTOMER (
CustomerID Integer Not Null
LastName Char(35)Not Null
First Name Char(25)Null
D)either B or C
E)The authors do not demonstrate a preference for how to define a primary key.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
42
SQL triggers are created using the SQL ADD TRIGGER statement.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
43
SQL triggers can be used when the DBMS receives an insert request.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
44
One advantage of using the CONSTRAINT phrase to define a primary key is that the database designer controls the ________.

A)name of the primary key
B)name of the foreign key
C)name of the constraint
D)A and B
E)A,B,and C
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
45
Which SQL keyword is used to name a new table and describe the table's columns?

A)SET
B)CREATE
C)SELECT
D)ALTER
E)CONSTRAINT
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
46
Which SQL keyword is used to delete a table's structure?

A)DELETE
B)DROP
C)DISPOSE
D)ALTER
E)MODIFY
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
47
When a trigger is fired,the DBMS makes the appropriate data available to the trigger code.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
48
Stored procedures have the advantage of greater security,decreased network traffic,SQL optimized by the DBMS compiler,and code sharing.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
49
The SQL Server DBMS supports the SQL BEFORE trigger.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
50
A stored program that is stored within the database and compiled when used is called a trigger.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
51
If the table PRODUCT has a column PRICE that has the data type Numeric (8,2),the value 12345 will be displayed by the DBMS as ________.

A)123.45
B)12345
C)12345.00
D)123450.00
E)00012345
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
52
Unlike application code,stored procedures are never distributed to the client computers.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
53
The SQL keyword used to limit column values to specific values is ________.

A)CONSTRAINT
B)CHECK
C)NOT NULL
D)UNIQUE
E)UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
54
Because SQL stored procedures allow and encourage code sharing among developers,stored procedures give database application developers the advantages of less work,standardized processing,and specialization among developers.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
55
Given the SQL statement
CREATE TABLE SALESREP (
SalesRepNo int NOT NULL,
RepName char(35)NOT NULL,
HireDate date NOT NULL,
CONSTRAINT SalesRepPK PRIMARY KEY (SalesRepNo),
CONSTRAINT SalesRepAK1 UNIQUE (RepName)
);
We know that ________.

A)RepName is the primary key
B)RepName is a foreign key
C)RepName is a candidate key
D)RepName is a surrogate key
E)None of the above is true
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
56
To set a column value to an initial value that is selected according to some business logic,you would use the SQL DEFAULT constraint with the CREATE TABLE command.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
57
Which SQL keyword is used to change the structure,properties or constraints of a table?

A)SET
B)CREATE
C)SELECT
D)ALTER
E)CONSTRAINT
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
58
If the values in an SQL view are not changeable through the view itself,you may still be able to update the view by using unique application logic.In this case,the specific logic is placed in an INSTEAD OF trigger.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
59
Which SQL keyword is used to impose restrictions on a table,data or relationship?

A)SET
B)CREATE
C)SELECT
D)ALTER
E)CONSTRAINT
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
60
If a trigger is being written to enforce referential integrity actions,you cannot use an INSTEAD OF trigger.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
61
Which SQL statement is used to retrieve view instances?

A)CREATE
B)DELETE
C)INSERT
D)SELECT
E)UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
62
When the correct SQL command is used to delete a table's structure,what happens to the data in the table?

A)If the deleted table was a parent table,the data is added to the appropriate rows of the child table.
B)If the deleted table was a child table,the data is added to the appropriate rows of the parent table.
C)The data in the table is also deleted.
D)Nothing because there was no data in the table since only an empty table can be deleted.
E)A and B
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
63
Which SQL keyword is used to add one or more rows of data to a table?

A)DELETE
B)INSERT
C)SELECT
D)SET
E)UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
64
An SQL virtual table is called ________.

A)a CHECK constraint
B)a view
C)embedded SQL
D)a trigger
E)a stored procedure
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
65
Which SQL keyword is used to change one or more rows in a table?

A)MODIFY
B)INSERT
C)SELECT
D)CHANGE
E)UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
66
Based on the tables below,which of the following SQL statements would increase the balance of the Gonzales account by $100 to a total of $450? GENERAL SALES DATABASE:
SALESREP
<strong>Based on the tables below,which of the following SQL statements would increase the balance of the Gonzales account by $100 to a total of $450? GENERAL SALES DATABASE: SALESREP   CUSTOMER  </strong> A)SELECT Gonzales FROM CUSTOMER INSERT VALUES PLUS (100)INTO Balance; B)SELECT Gonzales FROM CUSTOMER INSERT VALUES (450)INTO Balance; C)INSERT INTO CUSTOMER VALUES PLUS (100) SELECT Balance WHERE CustName = 'Gonzales'; D)INSERT INTO CUSTOMER VALUES (450) SELECT Balance WHERE CustName = 'Gonzales'; E)UPDATE CUSTOMER SET Balance = 450 WHERE CustName = 'Gonzales';
CUSTOMER
<strong>Based on the tables below,which of the following SQL statements would increase the balance of the Gonzales account by $100 to a total of $450? GENERAL SALES DATABASE: SALESREP   CUSTOMER  </strong> A)SELECT Gonzales FROM CUSTOMER INSERT VALUES PLUS (100)INTO Balance; B)SELECT Gonzales FROM CUSTOMER INSERT VALUES (450)INTO Balance; C)INSERT INTO CUSTOMER VALUES PLUS (100) SELECT Balance WHERE CustName = 'Gonzales'; D)INSERT INTO CUSTOMER VALUES (450) SELECT Balance WHERE CustName = 'Gonzales'; E)UPDATE CUSTOMER SET Balance = 450 WHERE CustName = 'Gonzales';

A)SELECT Gonzales
FROM CUSTOMER
INSERT VALUES PLUS (100)INTO Balance;
B)SELECT Gonzales
FROM CUSTOMER
INSERT VALUES (450)INTO Balance;
C)INSERT INTO CUSTOMER VALUES PLUS (100)
SELECT Balance
WHERE CustName = 'Gonzales';
D)INSERT INTO CUSTOMER VALUES (450)
SELECT Balance
WHERE CustName = 'Gonzales';
E)UPDATE CUSTOMER
SET Balance = 450
WHERE CustName = 'Gonzales';
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
67
Which keyword is used to remove one or more rows from a table?

A)DELETE
B)INSERT
C)ERASE
D)SET
E)UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
68
The SQL command used to create a virtual table is ________.

A)CREATE VTABLE
B)CREATE VIEW
C)VTABLE
D)VIEW
E)NEWLOOK
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
69
SQL views are always updatable when ________.

A)the view is based on a single table with no computed columns,and all non-null columns are present in the view
B)the view is based on any number of tables,with or without computed columns,and the INSTEAD OF trigger is defined for the view
C)the view is based on multiple tables,the update is being done on the most subordinate table,and the rows of that table can be uniquely identified
D)A and B
E)A,B,and C
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
70
According to the SQL-92,statements used to construct views cannot contain ________.

A)the SELECT clause
B)the FROM clause
C)the WHERE clause
D)the ORDER BY clause
E)SQL view statements can use all of the listed clauses.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
71
Which SQL keyword is used to change the values of an entire column?

A)CHANGE
B)INSERT
C)SELECT
D)SET
E)MODIFY
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
72
SQL views are used ________.

A)to hide columns
B)to show results of computed columns
C)to hide complicated SQL statements
D)to provide a level of indirection between data processed by applications and the data actually stored in the database tables
E)SQL views are used for all of the above.
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
73
Because SQL statements are table-oriented,whereas programs are element-oriented,the results of SQL statements used in programs are accessed using ________.

A)standard programming tools
B)custom written programming tools
C)an SQL cursor
D)an SQL trigger
E)an SQL stored procedure
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
74
A stored program that is attached to a table or view is called ________.

A)a CHECK constraint
B)a view
C)embedded SQL
D)a trigger
E)a stored procedure
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
75
Because SQL statements are set-oriented,whereas programs are element-oriented,the results of SQL statements used in programs are treated as ________.

A)tables
B)columns
C)rows
D)files
E)pseudofiles
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
76
Which of the following is not an ANSI SQL trigger?

A)BEFORE UPDATE
B)INSTEAD OF UPDATE
C)BEFORE INSERT
D)INSTEAD OF CONSTRAINT
E)AFTER DELETE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
77
SQL views are constructed from ________.

A)CREATE statements
B)INSERT statements
C)UPDATE statements
D)SELECT statements
E)VIEW statements
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
78
A set of SQL statements stored in an application written in a standard programming language is called ________.

A)a CHECK constraint
B)a view
C)embedded SQL
D)a trigger
E)a stored procedure
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
79
If the values in an SQL view are changeable through the view itself,which SQL statement is used to change the values?

A)CREATE
B)DELETE
C)INSERT
D)SELECT
E)UPDATE
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
80
Which of the following is an SQL trigger Oracle supports?

A)BEFORE
B)INSTEAD OF
C)AFTER
D)B and C only
E)A,B,and C
Unlock Deck
Unlock for access to all 100 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 100 flashcards in this deck.