0% found this document useful (0 votes)
427 views

Query Optimization MCQ

The document discusses the process of query processing in a database. It covers key steps like parsing, optimization, and evaluation. 24 multiple choice questions are provided about these different steps in fetching data from a database through query processing.

Uploaded by

Sameer verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
427 views

Query Optimization MCQ

The document discusses the process of query processing in a database. It covers key steps like parsing, optimization, and evaluation. 24 multiple choice questions are provided about these different steps in fetching data from a database through query processing.

Uploaded by

Sameer verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

1.

Query ___ is the activity performed in extracting data from the


database.

A. Result
B. Inhibition
C. System
D. Processing

Answer: D) Processing

Explanation:

Query Processing is the activity performed in extracting data from the


database.

Discuss this Question

2. Data is ___ from the database using various steps in query processing.

A. Extracted
B. Added
C. Fetched
D. Deleted

Answer: C) Fetched

Explanation:

Data is fetched from the database using various steps in query processing.

Discuss this Question

3. How many steps are involved in fetching the data from the database in
query processing?

A. 1
B. 2
C. 3
D. 4
Answer: C) 3

Explanation:

There are 3 steps involved in fetching the data from the database in query
processing.

Discuss this Question

4. What is/are the step(s) involved in fetching the data from the database
in query processing?

A. Parsing and translation


B. Optimization
C. Evaluation
D. All of the above

Answer: D) All of the above

Explanation:

The steps involved in fetching the data from the database in query processing
are -

i. Parsing and translation


ii. Optimization
iii. Evaluation

Discuss this Question

5. Initial queries from users are translated into a ____ database language
such as SQL.

A. Low-level
B. Medium-level
C. High-level
D. None

Answer: C) High-level
Explanation:

Initial queries from users are translated into a high-level database language
such as SQL.

Discuss this Question

6. The queries are translated into ___ expressions at the level of the file
system, which are used there as well.

A. Virtual
B. Real
C. Physical
D. None

Answer: C) Physical

Explanation:

The queries are translated into physical expressions at the level of the file
system, which are used there as well.

Discuss this Question

7. As soon as the queries are translated, they are evaluated and various
___ transformations are performed.

A. Query-realizing
B. Query-optimizing
C. Query-deoptimizing
D. Query-deletion

Answer: B) Query-optimizing

Explanation:

As soon as the queries are translated, they are evaluated and various query-
optimizing transformations are performed.
Discuss this Question

8. Whenever a computer system processes a query, it ___ first convert it


into a language humans can comprehend.

A. Need not to
B. Must
C. Can
D. Maybe

Answer: C) Can

Explanation:

Whenever a computer system processes a query, it must first convert it into a


language humans can comprehend.

Discuss this Question

9. Query languages such as SQL are best suited for humans, however, it is
not best suited for the ____ of queries to a system.

A. Temptation
B. Processing
C. Transmission
D. None

Answer: C) Transmission

Explanation:

Query languages such as SQL are best suited for humans, however, it is not
best suited for the transmission of queries to a system.

Discuss this Question

10. An ___ representation of a query is best suited to relational algebra.


A. External
B. Internal
C. Both A and B
D. None of the above

Answer: B) Internal

Explanation:

An internal representation of a query is best suited to relational algebra.

Discuss this Question

11. Similar to a query parser, ___ is important in query processing.

A. Transmission
B. Translation
C. Transfusion
D. Transcreation

Answer: B) Translation

Explanation:

Similar to a query parser, translation is important in query processing.

Discuss this Question

12. A user executes a query which the ___ in the system uses to generate
the internal form of the query. In addition to checking the syntax of the
query, the ____ verifies the name of the relation in the database, then the
tuple, then the attribute value.

A. Parser
B. Translation
C. Optimization
D. Evaluation

Answer: A) Parser
Explanation:

A user executes a query which the parser in the system uses to generate the
internal form of the query. In addition to checking the syntax of the query, the
parser verifies the name of the relation in the database, then the tuple, then
the attribute value.

Discuss this Question

13. An '_____' is a tree of the query that the parser creates.

A. Parse-tree
B. Query-tree
C. Tree
D. None

Answer: A) Parse-tree

Explanation:

An 'parse-tree' is a tree of the query that the parser creates.

Discuss this Question

14. To evaluate the translated ___ expression, it must be annotated with


the instructions used to specify and evaluate each operation along with
the translation.

A. Analytical algebra
B. Relational algebra
C. Both A and B
D. None of the above

Answer: B) Relational algebra

Explanation:
To evaluate the translated relational algebra expression, it must be annotated
with the instructions used to specify and evaluate each operation along with
the translation.

Discuss this Question

15. The system must create a query ____ plan before it can fully evaluate a
query.

A. Optimization
B. Parser
C. Translation
D. Evaluation

Answer: D) Evaluation

Explanation:

The system must create a query evaluation plan before it can fully evaluate a
query.

Discuss this Question

16. Depending on the assessment plan, annotations can be added to


specify the algorithm to be used for the particular ____.

A. Index
B. Operation
C. Both A and B
D. None of the above

Answer: C) Both A and B

Explanation:

Depending on the assessment plan, annotations can be added to specify the


algorithm to be used for the particular index or operation.

Discuss this Question


17. Evaluation _____ are a special kind of relational algebra with
annotations.

A. Primitives
B. Optimization
C. Advancement
D. None

Answer: A) Primitives

Explanation:

Evaluation Primitives are a special kind of relational algebra with annotations.

Discuss this Question

18. In the primitives for ____, all instructions necessary for an operation's
____ are contained.

A. Parser
B. Translation
C. Evaluation
D. Optimization

Answer: C) Evaluation

Explanation:

In the primitives for evaluation, all instructions necessary for an operation's


evaluation are contained.

Discuss this Question

19. ____ evaluation plans describe the underlying primitive operations


that are used to evaluate a query.

A. Query
B. Data
C. Log
D. Array

Answer: A) Query

Explanation:

Query evaluation plans describe the underlying primitive operations that are
used to evaluate a query.

Discuss this Question

20. Query evaluation plans are also known as query ____ plans.

A. Execution
B. Enumeration
C. Eternal
D. None

Answer: A) Execution

Explanation:

Query execution plans are also known as query evaluation plans.

Discuss this Question

21. To generate the output of a query, a ___ is responsible.

A. Query execution engine


B. Query execution motor
C. Query execution train
D. None

Answer: A) Query execution engine

Explanation:
To generate the output of a query, a query execution engine is responsible.

Discuss this Question

22. In the end, it makes the user's query ____ after taking the query
execution plan, executing it, and finally making the ____.

A. Input
B. Output
C. Query
D. Log

Answer: B) Output

Explanation:

In the end, it makes the user's query output after taking the query execution
plan, executing it, and finally making the output.

Discuss this Question

23. What is TRUE about Query Optimization?

A. The cost of evaluating a query can vary depending on its type.


B. The evaluation plan is built by the system, so the user need not focus on
writing their query efficiently.
C. An efficient query evaluation plan is generated by a database system,
which minimizes its costs.
D. All of the above

Answer: D) All of the above

Explanation:

In case of Query Optimization -

i. The cost of evaluating a query can vary depending on its type.


ii. The evaluation plan is built by the system, so the user need not focus on
writing their query efficiently.
iii. An efficient query evaluation plan is generated by a database system,
which minimizes its costs.

Discuss this Question

24. An efficient query evaluation plan is generated by a database system,


which minimizes its costs and it is known as -

A. Query evaluation
B. Query optimization
C. Query parser
D. Query translation

Answer: B) Query optimization

Explanation:

An efficient query evaluation plan is generated by a database system, which


minimizes its costs and it is known as Query optimization.

Discuss this Question

25. It is mandatory that the query ___ has an estimate of each operation's
cost when optimizing a query.

A. Evaluator
B. Optimizer
C. Parser
D. Translator

Answer: B) Optimizer

Explanation:

It is mandatory that the query optimizer has an estimate of each operation's


cost when optimizing a query.

Discuss this Question


26. Costs of memory allocation, execution, and so on are factors that
impact the overall ___ cost.

A. Execution
B. Allocation
C. Operation
D. None

Answer: C) Operation

Explanation:

Costs of memory allocation, execution, and so on are factors that impact the
overall operation cost.

Discuss this Question

27. When a query is evaluated, the system produces an output based on


the ____ plan selected.

A. Query plan
B. Evaluation plan
C. System plan
D. Output plan

Answer: B) Evaluation plan

Explanation:

When a query is evaluated, the system produces an output based on the


evaluation plan selected.

You might also like