Database Questions and Answers – Evaluation of Expressions

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

1. Pictorial representation of an expression is called
a) Expression tree
b) Operator tree
c) Expression flow
d) Expression chart
View Answer

Answer: b
Explanation: The operator tree has a tree like format where the evaluation starts from root of the tree.

2. The results of each intermediate operation are created and then are used for evaluation of the next-level operations. This is called
a) Materialized evaluation
b) Expression evaluation
c) Tree evaluation
d) Tree materialization
View Answer

Answer: a
Explanation: The cost of a materialized evaluation is not simply the sum of the costs of the operations involved.

3. ______________ allows the algorithm to execute more quickly by performing CPU activity in parallel with I/O activity.
a) Buffering
b) Double buffering
c) Multiple buffering
d) Double reading
View Answer

Answer: a
Explanation: Double buffering using two buffers, with one continuing execution of the algorithm while the other is being written out.
advertisement
advertisement

4. Pipelines can be executed in
a) 4
b) 3
c) 2
d) 5
View Answer

Answer: c
Explanation: Demand driven and producer driven pipelines are the two ways.

5. In a _________ the system makes repeated requests for tuples from the operation at the top of the pipeline.
a) Demand-driven pipeline
b) Producer-driven pipeline
c) Demand pipeline
d) All of the mentioned
View Answer

Answer: a
Explanation: Each time that an operation receives a request for tuples, it computes the next tuple (or tuples) to be returned, and then returns that tuple.

6. In a _____________ operations do not wait for requests to produce tuples, but instead generate the tuples eagerly.
a) Demand-driven pipeline
b) Producer-driven pipeline
c) Demand pipeline
d) All of the mentioned
View Answer

Answer: b
Explanation: Each operation in a producer-driven pipeline is modeled as a separate process or thread within the system that takes a stream of tuples from its pipelined inputs and generates a stream of tuples for its output.

7. Each operation in a demand-driven pipeline can be implemented as an ____ that provides the following functions: open(), next(), and close().
a) Demand
b) Pipeline
c) Iterator
d) All of the mentioned
View Answer

Answer: c
Explanation: After a call to open(), each call to next() returns the next output tuple of the operation.
advertisement

8. The iterator maintains the __________ of its execution in between calls so that successive next() requests receive successive result tuples.
a) State
b) Transition
c) Rate
d) Block
View Answer

Answer: a
Explanation: The function close() tells an iterator that no more tuples are required.

9. Tuples are generated ___________ in producer-driven pipelining, they are generated ________ on demand, in demand-driven pipelining.
a) Lazily, Eagerly
b) Eagerly, Lazily
c) Slowly, Eagerly
d) Eagerly, Slowly
View Answer

Answer: b
Explanation: Producer-driven pipelining is very useful in parallel processing systems.
advertisement

10. When two inputs that we desire to pipeline into the join are not already sorted it is the _____________ technique.
a) Hash join
b) Buffer join
c) double-pipelined hash join
d) double-pipelined join
View Answer

Answer: d
Explanation: When hash indices are used on tuples, the resultant algorithm is called the double-pipelined hash-join technique.

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.