Week 2 - Practice quiz Flashcards
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
4) Heap files
Heap files are in random order.
For which type of operations are heap files a sufficient method?
1) Indexing data
2) Selecting data
3) Bulk loading data
4) Sorting data
3) Bulk loading data
Bulk loading data does not require special treatment. Therefore, heap files are sufficient for such operations.
What is the purpose of file indexes?
1) Selecting data
2) Sorting data
3) Searching data
4) Loading data
3) Searching data
File indexes are created to speed up data search process.
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.
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.
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?
1) Which record(s) should be part of an index?
This question is not relevant. An index is built using fields, not records.
What does CPU stand for?
1) Center Processor Unit
2) Central Process Unit
3) Central Processing Unit
4) Center Process Unit
3) Central Processing Unit
The CPU stands for Central Processing Unit.
Which of the following computer components has the fastest processing speed?
1) Memory
2) CPU
3) Cache
4) Hard Disk
2) CPU
The CPU is the fastest of all computer components.
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
.
4) Memory
The buffer manager loads pages from hard disk to computer memory.
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.
2) Heap files are in random order.
There is no specific order for heap files.
What kind of file organization is sufficient for bulk loading data?
1) Scanned files
2) Sorted files
3) Index files
4) Heap files
4) Heap files
Bulk loading data does not require special treatment. Therefore, heap files are sufficient for such operations.
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
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.
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.
2) Increase in the cost of storage.
Indexes require extra storage, which is a disadvantage.
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.
4) The records to be included in an index.
The records are the outcome of an index; they are not a decision variable.
Where are index files permanently stored in a computer?
1) CPU
2) Cache
3) Hard disk
4) Memory
I
3) Hard disk
Index files are stored in the hard disk of a computer.
Which of the following computer components has the slowest processing speed?
1) Cache
2) CPU
3) Hard Disk
4) Memory
3) Hard Disk
Correct
The hard disk is the slowest of all computer components.