Week 2 - Practice quiz Flashcards

1
Q

Which of the following file organizations must be used if one needs to retrieve all records in random order?

1) Scanned files
2) Sorted files
3) Indexes
4) Heap files

A

4) Heap files

Heap files are in random order.

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

For which type of operations are heap files a sufficient method?

1) Indexing data
2) Selecting data
3) Bulk loading data
4) Sorting data

A

3) Bulk loading data

Bulk loading data does not require special treatment. Therefore, heap files are sufficient for such operations.

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

What is the purpose of file indexes?

1) Selecting data
2) Sorting data
3) Searching data
4) Loading data

A

3) Searching data

File indexes are created to speed up data search process.

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

In terms of decreasing the time it takes to process data searches, when does it make sense to create indexes for a database table?

1) When data retrieved by queries is a large percentage of the available data in the table.
2) When the number of table columns is small.
3) When data retrieved by queries is a small percentage of the available data in the table.
4) When the number of rows is much lower than the number of columns in the table.

A

3) When data retrieved by queries is a small percentage of the available data in the table.

Indexes are most useful when data retrieved by queries is a small percentage of the available data.

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

Creating indexes is not a straightforward decision because of the costs involved. One must answer certain questions before creating indexes. Which of the following questions is not relevant?

1) Which record(s) should be part of an index?
2) Which field(s) should be part of an index?
3) Which tables should be indexed?
4) Should one build multiple indexes?

A

1) Which record(s) should be part of an index?

This question is not relevant. An index is built using fields, not records.

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

What does CPU stand for?

1) Center Processor Unit
2) Central Process Unit
3) Central Processing Unit
4) Center Process Unit

A

3) Central Processing Unit

The CPU stands for Central Processing Unit.

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

Which of the following computer components has the fastest processing speed?

1) Memory
2) CPU
3) Cache
4) Hard Disk

A

2) CPU

The CPU is the fastest of all computer components.

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

The buffer manager loads pages from hard disk to which part of the computer?

1) Central Processing Unit
2) Solid State Drive
3 )Cache
4) Memory
.

A

4) Memory

The buffer manager loads pages from hard disk to computer memory.

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

Which of the following statements about heap files are correct?

1) Heap files are sufficient for selecting data.
2) Heap files are in random order.
3) Heap files are sufficient for indexing data.
4) Heap files are sufficient for sorting data.

A

2) Heap files are in random order.

There is no specific order for heap files.

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

What kind of file organization is sufficient for bulk loading data?

1) Scanned files
2) Sorted files
3) Index files
4) Heap files

A

4) Heap files

Bulk loading data does not require special treatment. Therefore, heap files are sufficient for such operations.

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

What kind of indexing scheme should be used in order to retrieve data on customers whose zip code is equal to 06902?

1) Clustered index
2) Equality index
3) Hash-based index
4) Heap-based index

A

Correct answer:
3) Hash-based index

Hash-based indexes are good for equality selections.

4) Heap-based index - NOPE there is no such indexing scheme.

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

Which of the following is a disadvantage of using indexes in a database?

1) Increase in the speed of search.
2) Increasei n the cost of storage.
3) Decrease in the performance of update queries.
4) Decrease in the performance of select queries.

A

2) Increase in the cost of storage.

Indexes require extra storage, which is a disadvantage.

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

Which of the following is not a decision variable when building indexes?

1) The tables to be included in an index.
2) The attributes to be included in an index.
3) The fields to be included in an index.
4) The records to be included in an index.

A

4) The records to be included in an index.

The records are the outcome of an index; they are not a decision variable.

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

Where are index files permanently stored in a computer?

1) CPU
2) Cache
3) Hard disk
4) Memory

I

A

3) Hard disk

Index files are stored in the hard disk of a computer.

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

Which of the following computer components has the slowest processing speed?

1) Cache
2) CPU
3) Hard Disk
4) Memory

A

3) Hard Disk

Correct

The hard disk is the slowest of all computer components.

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