Exam 2 Prep Flashcards
An atomic attribute ____.
a. cannot exist in a relational table
b. cannot be further subdivided
c. displays multiplicity
d. is always chosen to be a foreign key
b. cannot be further subdivided
A table that has all key attributes defined, has no repeating groups, and all its attributes are dependent on the primary key, is said to be in ____.
1NF
2NF
3NF
4NF
1NF
A table that is in 1NF and includes no partial dependencies is said to be in ____.
BCNF
2NF
3NF
4NF
2NF
A table that is in 2NF and contains no transitive dependencies is said to be in ____.
1NF
2NF
3NF
4NF
3NF
A relational table must not contain a(n) ____.
entity
attribute
relationship
repeating group (i.e., multi-valued attributes)
repeating group (i.e., multi-valued attributes)
To list all the contents of the PRODUCT table, you would use ____.
LIST * FROM PRODUCT;
SELECT * FROM PRODUCT;
DISPLAY * FROM PRODUCT;
SELECT ALL FROM PRODUCT;
SELECT * FROM PRODUCT;
The SQL command that lets you select attributes from rows in one or more tables is ____.
INSERT
SELECT
COMMIT
UPDATE
SELECT
The SQL command that modifies an attribute’s values in one or more table’s rows is ____.
INSERT
SELECT
COMMIT
UPDATE
UPDATE
SQL character data format(s) is(are) ____.
CHAR and VARCHAR
VARCHAR only
Alphanumeric
CHAR only
CHAR and VARCHAR
The SQL command that lets you insert rows into a table is ____.
INSERT
SELECT
COMMIT
UPDATE
INSERT
When you issue the DELETE FROM tablename command without specifying a WHERE condition, ____.
no rows will be deleted
the first row will be deleted
the last row will be deleted
all rows will be deleted
all rows will be deleted
A(n) ____ is a query that is embedded (or nested) inside another query.
alias
operator
subquery
view
subquery
An example of a command you would use when making changes to a PRODUCT table is ____.
CHANGE PRODUCT
SET P_INDATE = ‘18-JAN-2004’
WHERE P_CODE = ‘13-Q2/P2’;
ROLLBACK PRODUCT
SET P_INDATE = ‘18-JAN-2004’
WHERE P_CODE = ‘13-Q2/P2’;
EDIT PRODUCT
SET P_INDATE = ‘18-JAN-2004’
WHERE P_CODE = ‘13-Q2/P2’;
UPDATE PRODUCT
SET P_INDATE = ‘18-JAN-2004’
WHERE P_CODE = ‘13-Q2/P2’;
UPDATE PRODUCT
SET P_INDATE = ‘18-JAN-2004’
WHERE P_CODE = ‘13-Q2/P2’;
The ____ command would be used to delete the table row where the P_CODE is ‘BRT-345’.
DELETE FROM PRODUCT
WHERE P_CODE = ‘BRT-345’;
REMOVE FROM PRODUCT
WHERE P_CODE = ‘BRT-345’;
ERASE FROM PRODUCT
WHERE P_CODE = ‘BRT-345’;
ROLLBACK FROM PRODUCT
WHERE P_CODE = ‘BRT-345’;
DELETE FROM PRODUCT
WHERE P_CODE = ‘BRT-345’;
UPDATE tablename
*****
[WHERE conditionlist];
The ____ command replaces the ***** in the syntax of the UPDATE command, shown above.
SET columnname = expression
columnname = expression
expression = columnname
LET columnname = expression
SET columnname = expression
Assume you are using the UNION operator to combine the results from two tables with identical structure, CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains 7 rows. Customers Dunne and Olowski are included in the CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the UNION operator?
7
10
15
17
15
The following SQL statement uses a(n) ____.
SELECT P_CODE, P_DESCRIPT, P_PRICE, V_NAME
FROM PRODUCT, VENDOR
WHERE PRODUCT.V_CODE = VENDOR.V_CODE;
cross join
relational set operator
“old-style” join
outer join
“old-style” join
When using a(n) ____ join, only rows that match the given criteria are returned.
full
inner
outer
set
inner
Assume you are using the UNION ALL operator to combine the results from two tables with identical structure, CUSTOMER and CUSTOMER_2. The CUSTOMER table contains 10 rows, while the CUSTOMER_2 table contains 7 rows. Customers Dunne and Olowski are included in the CUSTOMER table as well as in the CUSTOMER_2 table. How many records are returned when using the UNION ALL operator?
7
10
15
17
17
“Union-compatible” means that the ____.
names of the relation attributes can be different, but the data types must be identical
names of the relation attributes must be the same, but the data types can be different
number of attributes must be the same, and their data types must be compatible
number of attributes must be the same, but the names and data types can be different
number of attributes must be the same, and their data types must be compatible
The ____ operator could be used in place of INTERSECT if the RDBMS does not support it.
IN
OF
AND
UNION
IN
The ____ statement in SQL combines rows from two queries and returns only the rows that appear in the first set but not in the second.
UNION
UNION ALL
INTERSECT
MINUS
MINUS
The ____ operator could be used in place of MINUS if the RDBMS does not support it.
IN
NOT IN
AND
UNION
NOT IN
The statement SELECT * FROM T1, T2 produces a(n) ____ join.
cross
natural
equi-
full
cross
The ____ statement in SQL combines rows from two queries and returns only the rows that appear in both sets.
UNION
UNION ALL
INTERSECT
MINUS
INTERSECT
How many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 12?
108
20
92
96
96
A ____ join returns rows with matching values and includes all rows from both tables (T1 and T2) with unmatched values.
natural
cross
full outer
left outer
full outer
The initial assessment and the feasibility study are part of the SDLC’s ____ phase.
planning
analysis
detailed systems design
implementation
planning
Coding, testing, and debugging are part of the ____ phase of the SDLC.
planning
analysis
detailed systems design
implementation
implementation
The detailed systems design of the system’s processes is completed during the ____ phase of the SDLC.
planning
analysis
design
implementation
design
User requirements, existing system evaluation, and logical system design are part of the ____ phase of the SDLC.
planning
analysis
detailed systems design
implementation
analysis
Evaluation, maintenance, and enhancement are part of the ____ phase of the SDLC.
planning
maintenance
detailed systems design
implementation
maintenance
The primary objective of database design is ____.
To create the most efficient database possible
To create normalized, nonredundant, and fully integrated conceptual, logical, and physical database models
To create the fastest queries
To be able to add data quickly
To create normalized, nonredundant, and fully integrated conceptual, logical, and physical database models
The ANSI has defined standards that govern SQL database transactions. Transaction support is provided by two SQL statements: ____ and ROLLBACK.
RETRIEVE
ASSIGN
UPDATE
COMMIT
COMMIT
A transaction is a ____ unit of work that must be either entirely completed or aborted.
timed
practical
logical
physical
logical
All transactions must display ____.
atomicity, consistency, and durability
durability and isolation
consistency, durability, and isolation
atomicity, durability, consistency, isolation, and serializability
atomicity, durability, consistency, isolation, and serializability
____ means that data used during the execution of a transaction cannot be used by a second transaction until the first one is completed.
Serializability
Atomicity
Isolation
Time stamping
Isolation
____ requires that all operations within a transaction be completed together as one unit.
Specificity
Atomicity
Durability
Time stamping
Atomicity
A ____ lock locks the entire table preventing access to any row by a transaction while another transaction is using the table.
database-level
table-level
page-level
row-level
table-level
ANSI defines four events that signal the end of a transaction. Of the following events, which is defined by ANSI as being equivalent to a COMMIT?
Five SQL statements are executed.
The end of a program is successfully reached.
The program is abnormally terminated.
The database is shut down for maintenance.
The end of a program is successfully reached.
As long as two transactions, T1 and T2, access ____ data, there is no conflict, and the order of execution is irrelevant to the final outcome.
shared
common
unrelated
locked
unrelated
____ are required to prevent another transaction from reading inconsistent data.
Locks
Schedules
Stamps
Logs
Locks
The information stored in the ____ is used by the DBMS for a recovery requirement triggered by a ROLLBACK statement, a program’s abnormal termination, or a system failure such as a network discrepancy or a disk crash.
data dictionary
metadata
rollback manager
transaction log
transaction log