1/49
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
The tables on which a view, or a virtual table derived from a SELECT query, are based are called _____ tables.
A. base
B. indexed
C. core
D. relation
base
A statement-level trigger is assumed if a designer omits the FOR EACH ROW keywords.
A. True
B. False
True
The _____ specification creates an individual index on a respective attribute; use it to avoid having duplicated values in a column.
A. UPDATE
B. NOT NULL
C. UNIQUE
D. VARCHAR
UNIQUE
A table can be deleted from the database by using the _____ TABLE command.
A. DROP
B. MODIFY
C. ERASE
D ELETE
DROP
The _____ command permanently saves all changes—such as rows added, attributes modified, and rows deleted—made to any table in the database.
A. UPDATE
B. SELECT
C. ROLLBACK
D. COMMIT
COMMIT
The _____ constraint assigns a value to an attribute when a new row is added to a table.
A. DEFAULT
B. NOT NULL
C. CASCADE
D. UNIQUE
DEFAULT
The Oracle string concatenation function is _____.
A. &&
B. CONCAT
C. +
D. ||
II
Words used by a system that cannot be used for any other purpose are called _____ words. For example, in Oracle SQL, the word INITIAL cannot be used to name tables or columns.
A. null
B. unique
C. character
D. reserved
Reserved
When you create a new database, the RDBMS automatically creates the data _____ tables in which to store the metadata and creates a default database administrator.
A. chapter
B. appendix
C. dictionary
D. index
Dictionary
A(n) _____ cursor is automatically created in procedural SQL when the SQL statement returns only one value.
A. dynamic
B. static
C. explicit
D. implicit
Implicit
The DECLARE section in the trigger is used to declare any variables used inside the trigger code.
A. True
B. False
True
A trigger is procedural SQL code that is automatically invoked by the RDBMS upon the occurrence of a given data manipulation event.
A. True
B. False
True
MySQL allows multiple triggering conditions per trigger.
A. True
B. False
False
Oracle recommends _____ for creating audit logs.
A. stored functions
B. tables
C. triggers
D. stored procedures
Triggers
The Oracle equivalent to an MS Access AutoNumber is a(n) _____.
A. sequence
B. trigger
C uto-number
D. TO_NUMBER function
sequence
No matter what language you use, if it contains embedded SQL statements, it is called the _____ language.
A. view
B. host
C. base
D. static
Host
When a user issues the DELETE FROM tablename command without specifying a WHERE condition, _____.
A. all rows will be deleted
B. the first row will be deleted
C. no rows will be deleted
D. the last row will be deleted
all rows will be deleted
A row-level trigger is assumed if we omit the FOR EACH ROW keywords and a statement-level trigger required the use of the FOR EACH ROW keyword.
A. True
B. False
False
The PL/SQL block starts with the _____ section.
A. BEGIN
B. DECLARE
C. IS
D. OPEN
DECLARE
Just like database triggers, stored procedures are stored in the database.
A. True
B. False
True
An explicit cursor must return two or more rows.
A. True
B. False
False
Every PL/SQL block must be given a name.
A. True
B. False
False
SQL requires the use of the _____ command to enter data into a table.
A. INSERT
B. SELECT
C. COMMIT
D. NOT NULL
INSERT
You cannot have an invalid entry in the foreign key column; at the same time, you cannot delete a vendor row as long as a product row references that vendor. This is known as _____.
A. batch updating
B. authentication
C. cross joining
D. referential integrity
referential integrity
In Oracle, _____ retrieves the current value of a sequence.
A. VARCHAR
B. NEXTVAL
C. VARCHAR2
D. CURRVAL
CURRVAL
Triggers can only be used to update table values.
A. True
B. False
False
The _____ constraint is used to validate data when an attribute value is entered.
A. SET NULL
B. UNIQUE
C. CHECK
D. CASCADE
CHECK
A persistent stored module is stored and executed on the database client machine.
A. True
B. False
False
In Oracle, you can use the SQL*Plus command SHOW ERRORS to help you diagnose errors found in PL/SQL blocks.
A. True
B. False
True
A _____ is a block of code containing standard SQL statements and procedural extensions that is stored and executed at the DBMS server.
A. statement-level trigger
B. persistent storage module (PSM)
C. cursor-style process
D. base table
Persistent storage Module (PSM)
Which statement describes a feature of Oracle sequences?
A. Oracle sequences generate a character string that can be assigned to tables.
B. An Oracle sequence uses the identity column property to automatically number rows.
C. Dropping a sequence does not delete values assigned to table attributes; it deletes only the sequence object from the database.
D. Oracle sequences are tied to columns and tables.
Dropping a sequence does not delete values assigned to table attributes; it deletes only the sequence object from the database.
The CREATE TABLE command lets you define constraints when you use the CONSTRAINT keyword, known as a(n) _____ constraint.
A. table
B. cell
C. column
D. index
table
Automating business procedures and automatically maintaining data integrity and consistency are trivial in a modern business environment.
A. True
B. False
False
To remedy the lack of procedural functionality in SQL, and to provide some standardization within the many vendor offerings, the SQL-99 standard defined the use of persistent stored modules.
A. True
B. False
True
One of the major advantages of stored procedures is that they can be used to encapsulate and represent business transactions.
A. True
B. False
True
The most useful feature of PL/SQL blocks is that they let a designer create code that can be named, stored, and executed by the DBMS.
A. True
B. False
True
Using the _____ command, SQL indexes can be created on the basis of any selected attribute.
A. SELECT
B. VARCHAR
C. CREATE INDEX
D. UPDATE CASCADE
CREATE INDEX
Which SQL format would be best used for a small, numeric data type?
A. CHAR(L)
B. SMALLINT
C. NUMERIC(L,D)
D. INTEGER
SMALLINT
SQL supports the conditional execution of procedures (IF-THEN-ELSE statements) that are typically supported by a programming language.
A. True
B. False
False
Which command would be used to delete the table row where the P_CODE is 'BRT-345'?
A. ERASE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
B. REMOVE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
C. DELETE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
D. ROLLBACK FROM PRODUCT
WHERE P_CODE = 'BRT-345';
DELETE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
When writing SQL table-creating command sequences, the entire table definition is enclosed in _____.
A. asterisks
B. commas
C. parentheses
D. quotations
parentheses
The _____ pseudo-column is used to select the next value from a sequence.
A. CURRVAL
B. NEXTVAL
C. GET_NEXT
D. NEXT
NEXTVAL
A view is a virtual table based on a SELECT query.
A. True
B. False
True
A sequence is not associated with a table and can be dropped from a database with a DROP SEQUENCE command.
A. True
B. False
True
All changes in a table structure are made using the _____ TABLE command, followed by a keyword that produces the specific changes a user wants to make.
A. COMMIT
B. UPDATE
C. ALTER
D. ROLLBACK
ALTER
BEFORE means before the changes are made in memory but after the changes are permanently saved to disk.
A. True
B. False
False
The _____ command is used to restore the database to its previous condition.
A. BACKUP
B. ROWCOUNT
C. COMMIT
D. ROLLBACK
ROLLBACK
_____ is a cursor attribute that returns TRUE if the last FETCH returned a row, and FALSE if not.
A. %FOUND
B. %ROWCOUNT
C. %ISOPEN
D. %NOTFOUND
%FOUND
Stored procedures must have at least one argument.
A. True
B. False
False
In Oracle, _____ make(s) it possible to merge SQL and traditional programming constructs, such as variables, conditional processing (IF-THEN-ELSE), basic loops (FOR and WHILE loops,) and error trapping.
A. stored procedures
B. embedded SQL
C. Procedural Language SQL
D. dynamic SQL
Procedural Language SQL