Query Processing Flashcards

1
Q

A system catalog stores _________

A

metadata

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

What is metadata?

A

Information that describes the data that is managed

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

Metadata and statistics about the DB are used to find the best way to _______ a query

A

evaluate

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

Metadata for tables include what?

A
Table name
Filename
File structure
Attribute names
Attribute types
Name of indexes
Integrity constraints
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Metadata for indexes include

A

Index name
Index Structure
Attributes of search key

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

Statistics for tables include

A

Cardinality

Size

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

Statistics for indexes include

A

Index Cardinality
Index Size
Index Height
Index Range

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

Declarative queries are translated into a _______ ________ to be executed

A

procedural language

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

Query evaluation plans are represented as trees of ______ ________

A

relational operators

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

An ______ _____ is way in which the rows of a table can be retrieved

A

Access path

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

An access path consists of an _____ plus a _________ selection condition

A

index, matching

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

A hash index matches conditions if there are only ______ in the conjunct

A

equalities

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

A tree index matches conditions for any _________ operator

A

comparison

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

The most selective access path retrieves the ______ pages

A

fewest

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

_______ depends on the conjunct in index matches

A

selectivity

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

What is the process for evaluating a selection?

A
  • If no index on R matches conditions, we scan R

- If 1+ indexes on R match, use the most selective index to retrieve matching rows

17
Q

What is the process for evaluating a projection?

A

Scan table or index and output required subset of fields for each tuple.

18
Q

Join is the most common and ______ operation

A

expensive

19
Q

What are 5 join algorithms?

A
  • Nested Loop joins
  • Block nested loops join
  • Index nested loop join
  • Sort-merge join
  • Hash join