Engineering Questions with Answers - Multiple Choice Questions

Database MCQ – Selection Operation

1 - Question

In query processing, the ___________ is the lowest-level operator to access data.
a) Index Search
b) Linear search
c) File scan
d) Access paths

View Answer

Answer: c
Explanation: File scans are search algorithms that locate and retrieve records that fulfill a selection condition.




2 - Question

In a ____________ the system scans each file block and tests all records to see whether they satisfy the selection condition.
a) Index Search
b) Linear search
c) File scan
d) Access paths

View Answer

Answer: b
Explanation: An initial seek is required to access the first block of the file.




3 - Question

Index structures are referred to as __________ since they provide a path through which data can be located and accessed.
a) Index Search
b) Linear search
c) File scan
d) Access paths

View Answer

Answer: d
Explanation: A primary index is an index that allows the records of a file to be read in an order that corresponds to the physical order in the file.




4 - Question

Search algorithms that use an index are referred to as
a) Index Search
b) Linear search
c) File scan
d) Access paths

View Answer

Answer: a
Explanation: Selection predicates are used to guide in the choice of the index to use in processing the query.




5 - Question

Which algorithm uses equality comparison on a key attribute with a primary index to retrieve a single record that satisfies the corresponding equality condition.
a) A2
b) A4
c) A5
d) A6

View Answer

Answer: a
Explanation: A2 – primary index, equality on key.




6 - Question

The strategy can retrieve a single record if the equality condition is on a key; multiple records may be retrieved if the indexing field is not a key is
a) A2
b) A4
c) A5
d) A6

View Answer

Answer: b
Explanation: A4 – Secondary index, equality.




7 - Question

The algorithm that uses a secondary ordered index to guide retrieval for comparison conditions involving <,≤,≥, or > is
a) A2
b) A4
c) A5
d) A6

View Answer

Answer: d
Explanation: A6 – Secondary index, comparison.




8 - Question

The ___ algorithm scans each index for pointers to tuples that satisfy an individual condition.
a) A2
b) A4
c) A9
d) A6

View Answer

Answer: c
Explanation: A9 – Conjunctive selection by an intersection of identifiers.




9 - Question

If access paths are available on all the conditions of a disjunctive selection, each index is scanned for pointers to tuples that satisfy the individual condition. This is satisfied by
a) A10
b) A7
c) A9
d) A6

View Answer

Answer: a
Explanation: A10 – Disjunctive selection by union of identifiers.




10 - Question

Conjunctive selection using one index. This is
a) A10
b) A7
c) A9
d) A6

View Answer

Answer: b
Explanation: To reduce the cost of A7 we choose a i and one of algorithms A1 through A6 for which the combination results in the least cost for i (r ). The cost of algorithm A7 is given by the cost of the chosen algorithm.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners