Chapter 8 Flashcards

1
Q

____ is a relational set operator.

A

-MINUS

PLUS

ALL

EXISTS

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

The ____ query combines rows from two queries and excludes duplicates.

A

-UNION

UNION ALL

INTERSECT

MINUS

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

The syntax for the UNION query is ____.

A

query + query

UNION (query, query)

UNION: query query

-query UNION query

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
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?

A

7

10

-15

17

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
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?

A

7

10

15

-17

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

The PL/SQL block starts with the ____ clause.

A

IS

OPEN

DECLARE

-BEGIN

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

A stored function uses the ____ statement to return a value.

A

EXIT

END

-RETURN

PROCESS

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

UNION, INTERSECT, and MINUS work properly only if relations are union-compatible, which means that the names of the relation attributes and their data types must be different.

A

false

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

SQL supports the conditional execution of procedures (if…then…else statements) that are typically supported by a programming language.

A

false

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

Procedural code is executed on the database client machine.

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
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;

A

set operator

natural join

-“old-style” join

procedural statement

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

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

A

full

-inner

outer

set

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

How many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 18?

A

8

18

26

-144

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

A(n) ____ join will select only the rows with matching values in the common attribute(s).

A

-natural

cross

full

outer

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

If you wish to create an inner join, but the two tables do not have a commonly named attribute, you can use a(n) ____ clause.

A

OF

USING

HAS

-JOIN ON

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

A(n) ____ join returns not only the rows matching the join condition (that is, rows with matching values in the common columns) but also the rows with unmatched values.

A

-outer

inner

equi-

cross

17
Q

The syntax for a left outer join is ____.

A

SELECT column-list
FROM table1 OUTER JOIN table2 LEFT
WHERE join-condition

-SELECT column-list
FROM table1 LEFT [OUTER] JOIN table2
ON join-condition

SELECT column-list
WHERE LEFT table1 = table 2

SELECT column-list
FROM table1 LEFT table2 [JOIN]
WHERE join-condition

18
Q

A ____ join returns rows with matching values and includes all rows from both tables (T1 and T2) with unmatched values.

A

natural

cross

-full outer

left outer

19
Q

In subquery terminology, the first query in the SQL statement is known as the ____ query.

A

outer

left

-inner

base

20
Q

Improving ____ leads to more flexible queries.

A

-atomicity

normalization

denormalization

derived attributes

21
Q

The most likely data type for a surrogate key is ____.

A

Character

Date

Logical

-Numeric

22
Q

From a system functionality point of view, ____ attribute values can be calculated when they are needed to write reports or invoices.

A

-derived

atomic

granular

historical

23
Q

For most business transactional databases, we should normalize relations into ____.

A

1NF

2NF

-3NF

6NF

24
Q

A table where every determinant is a candidate key is said to be in ____.

A

-BCNF

2NF

3NF

4NF

25
Q

Most designers consider the BCNF as a special case of the ____.

A

1NF

2NF

-3NF

4NF

26
Q

A table is in 4NF if it is in 3NF and ____.

A

all attributes must be dependent on the primary key, and must be dependent on each other

all attributes are unrelated

-has no multivalued dependencies

no column contains the same values

27
Q

Normalization represents a micro view of the ____ within the ERD.

A

-entities

attributes

relationships

forms

28
Q

The conflicts between design efficiency, information requirements, and processing speed are often resolved through ____.

A

conversion from 1NF to 2NF

conversion from 2NF to 3NF

-compromises that include denormalization

conversion from 3NF to 4NF