Topic 7 Flashcards
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. index
b. chapter
c. dictionary
d. appendix
dictionary
Which SQL format would be best used for a small, numeric data type?
a. INTEGER
b. SMALLINT
c. NUMERIC(L,D)
d. CHAR(L)
SMALLINT
When writing SQL table-creating command sequences, the entire table definition is enclosed in _____
a. asterisks
b. commas
c. quotations
d. parentheses
parentheses
The _____ specification creates an individual index on a respective attribute; use it to avoid having duplicated values in a column
a. UNIQUE
b. NOT NULL
c. UPDATE
d. VARCHAR
UNIQUE
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. reserved
b. unique
c. null
d. character
reserved
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. referential integrity
c. authentication
d. cross joining
referential integrity
The _____ constraint assigns a value to an attribute when a new row is added to a table
a. NOT NULL
b. CASCADE
c. UNIQUE
d. DEFAULT
DEFAULT
The _____ constraint is used to validate data when an attribute value is entered
a. UNIQUE
b. CASCADE
c. CHECK
d. SET NULL
CHECK
The CREATE TABLE command lets you define constraints when you use the CONSTRAINT keyword, known as a (n) _____ constraint
a. column
b. table
c. index
d. cell
table
Using the _____ command, SQL indexes can be created on the basis of any selected attribute.
a. CREATE INDEX
b. UPDATE CASCADE
c. SELECT
d. VARCHAR
CREATE INDEX
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. ALTER
b. COMMIT
c. UPDATE
d. ROLLBACK
ALTER
A table can be deleted from the database by using the _____ TABLE command
a. DROP
b. DELETE
c. MODIFY
d. ERASE
DROP
SQL requires the use of the _____ command to enter data into a table
a. INSERT
b. SELECT
c. COMMIT
d. NOT NULL
INSERT
The _____ command permanently saves all changes—such as rows added, attributes modified, and rows deleted—made to any table in the database
a. COMMIT
b. SELECT
c. ROLLBACK
d. UPDATE
COMMIT
Which command would be used to delete the table row where the P_CODE is ‘BRT-345’?
a. DELETE FROM PRODUCT
WHERE P_CODE = ‘BRT-345’;
b. REMOVE FROM PRODUCT
WHERE P_CODE = ‘BRT-345’;
c. ERASE 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 a user issues the DELETE FROM tablename command without specifying a WHERE condition, _____
a. no rows will be deleted
b. the first row will be deleted
c. the last row will be deleted
d. all rows will be deleted
all rows will be deleted
The _____ command is used to restore the database to its previous condition
a. ROWCOUNT
b. BACKUP
c. COMMIT
d. ROLLBACK
ROLLBACK
The tables on which a view, or a virtual table derived from a SELECT query, are based are called _____ tables
a. indexed
b. core
c. relation
d. base
base
The Oracle equivalent to an MS Access AutoNumber is a (n) _____
a. auto-number
b. sequence
c. TO_NUMBER function
d. trigger
sequence
Which statement describes a feature of Oracle sequences?
a. Oracle sequences are tied to columns and tables.
b. Oracle sequences generate a character string that can be assigned to tables.
c. An Oracle sequence uses the identity column property to automatically number rows.
d. Dropping a sequence does not delete values assigned to table attributes; it deletes only the sequence object from the database.
Dropping a sequence does not delete values assigned to table attributes; it deletes only the sequence object from the database.
The _____ pseudo-column is used to select the next value from a sequence
a. CURRVAL
b. NEXTVAL
c. NEXT
d. GET_NEXT
NEXTVAL
In Oracle, _____ retrieves the current value of a sequence
a. NEXTVAL
b. CURRVAL
c. VARCHAR
d. VARCHAR2
CURRVAL
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. dynamic SQL
b. stored procedures
c. embedded SQL
d. Procedural Language SQL
Procedural Language SQL
A _____ is a block of code containing standard SQL statements and procedural extensions that is stored and executed at the DBMS server
a. cursor-style process
b. statement-level trigger
c. base table
d. persistent storage module (PSM)
persistent storage module (PSM)