Topic 7 Flashcards

1
Q

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

A

dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which SQL format would be best used for a small, numeric data type?

a. INTEGER
b. SMALLINT
c. NUMERIC(L,D)
d. CHAR(L)

A

SMALLINT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When writing SQL table-creating command sequences, the entire table definition is enclosed in _____

a. asterisks
b. commas
c. quotations
d. parentheses

A

parentheses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

UNIQUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

reserved

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

referential integrity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

DEFAULT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The _____ constraint is used to validate data when an attribute value is entered

a. UNIQUE
b. CASCADE
c. CHECK
d. SET NULL

A

CHECK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

CREATE INDEX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

ALTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A table can be deleted from the database by using the _____ TABLE command

a. DROP
b. DELETE
c. MODIFY
d. ERASE

A

DROP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SQL requires the use of the _____ command to enter data into a table

a. INSERT
b. SELECT
c. COMMIT
d. NOT NULL

A

INSERT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

COMMIT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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’;

A

DELETE FROM PRODUCT

WHERE P_CODE = ‘BRT-345’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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

A

all rows will be deleted

17
Q

The _____ command is used to restore the database to its previous condition

a. ROWCOUNT
b. BACKUP
c. COMMIT
d. ROLLBACK

18
Q

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

19
Q

The Oracle equivalent to an MS Access AutoNumber is a (n) _____

a. auto-number
b. sequence
c. TO_NUMBER function
d. trigger

20
Q

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.

A

Dropping a sequence does not delete values assigned to table attributes; it deletes only the sequence object from the database.

21
Q

The _____ pseudo-column is used to select the next value from a sequence

a. CURRVAL
b. NEXTVAL
c. NEXT
d. GET_NEXT

22
Q

In Oracle, _____ retrieves the current value of a sequence

a. NEXTVAL
b. CURRVAL
c. VARCHAR
d. VARCHAR2

23
Q

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

A

Procedural Language SQL

24
Q

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)

A

persistent storage module (PSM)

25
The PL/SQL block starts with the _____ section a. IS b. OPEN c. DECLARE d. BEGIN
DECLARE
26
The Oracle string concatenation function is _____ a. CONCAT b. + c. || d. &&
||
27
Oracle recommends _____ for creating audit logs a. triggers b. stored procedures c. stored functions d. tables
triggers