Database Questions and Answers – Selection Operation

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Selection Operation”.

1. 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. 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. 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.
advertisement
advertisement

4. 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. 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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. 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. 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.
advertisement

8. 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. 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.
advertisement

10. 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.

Sanfoundry Global Education & Learning Series – Database Management System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.