Section 5 Flashcards

1
Q

Databases commonly support four alternative table structures

A

-Heap table
-Sorted table
-Hash table
-Table cluster

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

Heap tables

A

Optimize insert operations. — Are particularly fast for bulk load of many rows since rows are stored in load order.
In a —— no order is imposed on rows.

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

Hash table
Bucket

A

In a —- rows are assigned to buckets. A —- is a block or group of blocks containing rows

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

What is a simple hash function with four steps?

A

Modulo function

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

Table scan

A

Is a database operation that reads table blocks directly, without accessing an index

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

Index scan

A

Is a database operation that reads index blocks sequentially, in order to locate the needed table blocks

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

Hit ratio, also called filter factor or selectivity

A

Is the percentage of table rows selected by a query.

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

Binary search

A

The database repeatedly splits the index in two until it finds the entry containing the search value

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

Indexes may also be?

A

Dense or sparse

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

Dense index

A

Contains an entry for every table row

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

Sparse index

A

Contains an entry for every table block

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

Multi-level index

A

Stores column values and row pointers in a hierarchy

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

The number of index entries per block is called the —- of a multi-level index

A

Fan-out

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

Several additional index types are used less often but supported but many databases:

A

-Hash index
-Bitmap index
-Logical index
-Function index

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

Bitmap index

A

Is a grid of bits, contain ones and zeroes

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

A tablespace

A

Is a database object that maps one or more tables to a single file

17
Q

Logical design

A

Specifies tables, columns, and keys

18
Q

Physical design

A

Depecifies indexes, table structures, and partitions.
—– affects query performance but never affects query results

19
Q

Statement: CREATE INDEX
Description: ?
Syntax: ?

A

Description: Create an index
Syntax: CREATE INDEX IndexName ON TableName (Column1, Column2 …, ColumnN);