Exam 2 Prep Flashcards

1
Q

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

A

b. cannot be further subdivided

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

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

A

1NF

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

A table that is in 1NF and includes no partial dependencies is said to be in ____.

BCNF

2NF

3NF

4NF

A

2NF

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

A table that is in 2NF and contains no transitive dependencies is said to be in ____.

1NF

2NF

3NF

4NF

A

3NF

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

A relational table must not contain a(n) ____.

entity

attribute

relationship

repeating group (i.e., multi-valued attributes)

A

repeating group (i.e., multi-valued attributes)

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

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;

A

SELECT * FROM PRODUCT;

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

The SQL command that lets you select attributes from rows in one or more tables is ____.

INSERT

SELECT

COMMIT

UPDATE

A

SELECT

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

The SQL command that modifies an attribute’s values in one or more table’s rows is ____.

INSERT

SELECT

COMMIT

UPDATE

A

UPDATE

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

SQL character data format(s) is(are) ____.

CHAR and VARCHAR

VARCHAR only

Alphanumeric

CHAR only

A

CHAR and VARCHAR

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

The SQL command that lets you insert rows into a table is ____.

INSERT

SELECT

COMMIT

UPDATE

A

INSERT

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

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

A

all rows will be deleted

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

A(n) ____ is a query that is embedded (or nested) inside another query.

alias

operator

subquery

view

A

subquery

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

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

A

UPDATE PRODUCT
SET P_INDATE = ‘18-JAN-2004’
WHERE P_CODE = ‘13-Q2/P2’;

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

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

A

DELETE FROM PRODUCT

WHERE P_CODE = ‘BRT-345’;

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

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

A

SET columnname = expression

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

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

A

15

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

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

A

“old-style” join

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

When using a(n) ____ join, only rows that match the given criteria are returned.

full

inner

outer

set

A

inner

19
Q

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

A

17

20
Q

“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

A

number of attributes must be the same, and their data types must be compatible

21
Q

The ____ operator could be used in place of INTERSECT if the RDBMS does not support it.

IN
OF
AND
UNION

A

IN

22
Q

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

A

MINUS

23
Q

The ____ operator could be used in place of MINUS if the RDBMS does not support it.

IN
NOT IN
AND
UNION

A

NOT IN

24
Q

The statement SELECT * FROM T1, T2 produces a(n) ____ join.

cross
natural
equi-
full

A

cross

25
Q

The ____ statement in SQL combines rows from two queries and returns only the rows that appear in both sets.

UNION
UNION ALL
INTERSECT
MINUS

A

INTERSECT

26
Q

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

A

96

27
Q

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

A

full outer

28
Q

The initial assessment and the feasibility study are part of the SDLC’s ____ phase.

planning
analysis
detailed systems design
implementation

A

planning

29
Q

Coding, testing, and debugging are part of the ____ phase of the SDLC.

planning
analysis
detailed systems design
implementation

A

implementation

30
Q

The detailed systems design of the system’s processes is completed during the ____ phase of the SDLC.

planning
analysis
design
implementation

A

design

31
Q

User requirements, existing system evaluation, and logical system design are part of the ____ phase of the SDLC.

planning
analysis
detailed systems design
implementation

A

analysis

32
Q

Evaluation, maintenance, and enhancement are part of the ____ phase of the SDLC.

planning
maintenance
detailed systems design
implementation

A

maintenance

33
Q

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

A

To create normalized, nonredundant, and fully integrated conceptual, logical, and physical database models

34
Q

The ANSI has defined standards that govern SQL database transactions. Transaction support is provided by two SQL statements: ____ and ROLLBACK.

RETRIEVE
ASSIGN
UPDATE
COMMIT

A

COMMIT

35
Q

A transaction is a ____ unit of work that must be either entirely completed or aborted.

timed
practical
logical
physical

A

logical

36
Q

All transactions must display ____.

atomicity, consistency, and durability

durability and isolation

consistency, durability, and isolation

atomicity, durability, consistency, isolation, and serializability

A

atomicity, durability, consistency, isolation, and serializability

37
Q

____ 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

A

Isolation

38
Q

____ requires that all operations within a transaction be completed together as one unit.

Specificity

Atomicity

Durability

Time stamping

A

Atomicity

39
Q

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

A

table-level

40
Q

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.

A

The end of a program is successfully reached.

41
Q

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

A

unrelated

42
Q

____ are required to prevent another transaction from reading inconsistent data.

Locks

Schedules

Stamps

Logs

A

Locks

43
Q

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

A

transaction log