• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/87

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

87 Cards in this Set

  • Front
  • Back

1) The SQL CREATE TABLE statement is used to name a new table and describe the table's columns.

Answer: TRUE

2) The SQL keyword CONSTRAINT is used to define one of five types of constraints.

Answer: TRUE
3) The SQL keyword PRIMARY KEY is used to designate the column(s) that are the primary key for the table.
Answer: TRUE
4) The SQL keyword CONSTRAINT is used to limit column values to specific values.
Answer: TRUE
5) The SQL keyword CONSTRAINT is used in conjunction with the SQL keywords PRIMARY KEY and FOREIGN KEY.
Answer: TRUE
6) One advantage of using the CONSTRAINT command to define a primary key is that the database designer controls the name of the constraint.
Answer: TRUE
7) The SQL keyword UNIQUE is used to define alternative keys.
Answer: TRUE
8) 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.
Answer: FALSE
9) 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.
Answer: TRUE
10) The SQL keyword CHECK is used to limit column values to specific values.
Answer: TRUE
11) The SQL keyword MODIFY is used to change the structure, properties or constraints of a table.
Answer: FALSE
12) Data values to be added to a table are specified by using the SQL VALUES clause.
Answer: TRUE
13) The SQL keyword DELETE is used to delete a table's structure.
Answer: FALSE
14) 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.
Answer: FALSE
15) One or more rows can be added to a table by using the SQL INSERT statement.
Answer: TRUE
16) 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.
Answer: TRUE
17) Rows in a table can be changed by using the SQL UPDATE statement.
Answer: TRUE
18) The SQL SET keyword is used to specify a new value when changing a column value.
Answer: TRUE
19) The SQL keyword MODIFY is used to change a column value.
Answer: FALSE
20) Rows can be removed from a table by using the SQL DELETE statement.
Answer: TRUE
21) An SQL virtual table is called a view.
Answer: TRUE
22) The SQL command CREATE USER VIEW is used to create a virtual table.
Answer: FALSE
23) SQL views are constructed from SELECT statements.
Answer: TRUE
24) According to the SQL-92, statements used to construct views cannot contain the WHERE clause.
Answer: FALSE
25) The SQL command SELECT is used to retrieve view instances.
Answer: TRUE
26) The values in an SQL view are not always changeable through the view itself.
Answer: TRUE
27) SQL views can be used to hide columns.
Answer: TRUE
28) 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.
Answer: TRUE
29) If the values in an SQL view are changeable through the view itself, the SQL command UPDATE is used to change the values.
Answer: TRUE
30) The values in an SQL view are always changeable through the view itself.
Answer: FALSE
31) 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.
Answer: TRUE
32) Because SQL statements are table-oriented, whereas programs are variable-oriented, the results of SQL statements used in programs are treated as pseudofiles.
Answer: TRUE
33) A set of SQL statements stored in an application written in a standard programming language is called embedded SQL.
Answer: TRUE
34) 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.
Answer: TRUE
35) A stored program that is attached to a table or view is called a stored procedure.
Answer: FALSE
36) SQL triggers use the ANSI SQL keywords BEFORE, INSTEAD OF, and AFTER.
Answer: TRUE
37) SQL triggers can be used with SQL operations INSERT, UPDATE, and DELETE.
Answer: TRUE
38) SQL triggers can be used when the DBMS receives an INSERT request.
Answer: TRUE
39) SQL triggers are used for providing default values, validity checking, updating views, and performing referential integrity actions.
Answer: TRUE
40) The Oracle DBMS supports the SQL BEFORE trigger.
Answer: TRUE
41) The SQL Server DBMS supports the SQL BEFORE trigger.
Answer: FALSE
42) SQL triggers can be used when the DBMS receives an insert request.
Answer: TRUE
43) 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.
Answer: FALSE
44) SQL triggers are created using the SQL ADD TRIGGER statement.
Answer: FALSE
45) 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.
Answer: TRUE
46) If a trigger is being written to enforce referential integrity actions, you cannot use an INSTEAD OF trigger.
Answer: FALSE
47) When a trigger is fired, the DBMS makes the appropriate data available to the trigger code.
Answer: TRUE
48) A stored program that is stored within the database and compiled when used is called a trigger.
Answer: FALSE
49) Stored procedures have the advantage of greater security, decreased network traffic, SQL optimized by the DBMS compiler, and code sharing.
Answer: TRUE
50) Unlike application code, stored procedures are never distributed to the client computers.
Answer: TRUE
51) 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.
Answer: TRUE
52) 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
Answer: B
53) 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
Answer: A
54) Which SQL keyword is used to impose restrictions on a table, data or relationship?
A) SET
B) CREATE
C) SELECT
D) ALTER
E) CONSTRAINT
Answer: E
55) 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
Answer: C

58) The SQL keyword used to limit column values to specific values is ________.
A) CONSTRAINT
B) CHECK
C) NOT NULL
D) UNIQUE
E) UPDATE
Answer: B
59) 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
Answer: D
60) Which SQL keyword is used to delete a table's structure?
A) DELETE
B) DROP
C) DISPOSE
D) ALTER
E) MODIFY
Answer: B
61) 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
Answer: C
62) 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
Answer: B
63) Which SQL keyword is used to change one or more rows in a table?
A) MODIFY
B) INSERT
C) SELECT
D) CHANGE
E) UPDATE
Answer: E
64) Which SQL keyword is used to change the values of an entire column?
A) CHANGE
B) INSERT
C) SELECT
D) SET
E) MODIFY
Answer: D
65) Which keyword is used to remove one or more rows from a table?
A) DELETE
B) INSERT
C) ERASE
D) SET
E) UPDATE
Answer: A

67) An SQL virtual table is called ________.
A) a CHECK constraint
B) a view
C) embedded SQL
D) a trigger
E) a stored procedure
Answer: B
68) The SQL command used to create a virtual table is ________.
A) CREATE VTABLE
B) CREATE VIEW
C) VTABLE
D) VIEW
E) NEWLOOK
Answer: B
69) SQL views are constructed from ________.
A) CREATE statements
B) INSERT statements
C) UPDATE statements
D) SELECT statements
E) VIEW statements
Answer: D
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.
Answer: D
71) Which SQL statement is used to retrieve view instances?
A) CREATE
B) DELETE
C) INSERT
D) SELECT
E) UPDATE
Answer: D
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.
Answer: E
73) 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
Answer: E
74) 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
Answer: D
75) 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
Answer: C
76) 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
Answer: E
77) 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
Answer: C
78) 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
Answer: D
79) 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
Answer: D
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
Answer: E
81) Which of the following is an SQL trigger Microsoft SQL Server supports?
A) BEFORE
B) INSTEAD OF
C) AFTER
D) B and C only
E) A, B, and C
Answer: D
82) SQL triggers can be used when the DBMS receives a(n) ________ request.
A) INSERT
B) UPDATE
C) DELETE
D) A and B
E) A, B, and C
Answer: E
83) SQL triggers are used for ________.
A) validity checking
B) providing default values
C) updating views
D) A and B
E) A, B, and C
Answer: E
84) When a trigger is fired, the DBMS makes the appropriate data available to ________.
A) the SQL interpreter
B) the application code
C) the embedded SQL code
D) the trigger code
E) the stored procedure code
Answer: D
85) SQL triggers are created using ________.
A) the SQL CREATE TRIGGER statement
B) the SQL ADD TRIGGER statement
C) the SQL TRIGGER statement
D) the SQL ADD CONSTRAINT TRIGGER statement
E) the SQL CONSTRAINT TRIGGER statement
Answer: A
86) To set a column value to an initial value that is selected according to some business logic, you would use:
A) the SQL DEFAULT constraint with the CREATE TABLE command.
B) an SQL view.
C) embedded SQL.
D) an SQL trigger.
E) an SQL stored procedure.
Answer: D
87) 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 ________.
A) a BEFORE trigger
B) an INSTEAD OF trigger
C) an AFTER trigger
D) Depending on the specific logic, either A or B can be used.
E) Depending on the specific logic, any of A, B, or C can be used.
Answer: B
88) A stored program that is attached to the database is called ________.
A) a CHECK constraint
B) a view
C) embedded SQL
D) a trigger
E) a stored procedure
Answer: E
89) Stored procedures have the advantage of ________.
A) greater security
B) decreased network traffic
C) SQL optimized by the DBMS compiler
D) code sharing
E) All of the above
Answer: E

90) Because SQL stored procedures allow and encourage code sharing among developers, stored procedures give database application developers the advantages of ________.
A) less work
B) standardized processing
C) specialization among developers
D) A and B
E) A, B, and C

Answer: E