Blank Space Questions
Blank Space Questions
1. Query processing is a series of steps that a DBMS takes to retrieve results from a
database when a user submits a query.
Answer: Query processing
Explanation: Query processing involves transforming a high-level query into an
executable form and optimizing it for efficiency.
2. The process of checking query syntax and converting it into an internal form is called
____________.
Answer: Parsing and translation
Explanation: Parsing ensures the query follows syntax rules and translates it into an
internal representation.
3. The ____________ module generates the code needed to execute a query after
optimization.
Answer: Code generator
Explanation: The code generator translates the execution plan into a low-level format
the DBMS can run.
4. A ____________ is a basic unit that can be translated into relational algebra and
optimized separately.
Answer: Query block
Explanation: A query block contains a SELECT-FROM-WHERE expression and is
optimized independently.
5. The ____________ component is responsible for choosing the most efficient way to
execute a query.
Answer: Query optimizer
Explanation: The optimizer evaluates different query execution strategies and selects the
best one.
6. ____________ optimization applies predefined transformation rules without considering
cost.
Answer: Heuristic
Explanation: Heuristic (rule-based) optimization simplifies queries using predefined
transformations.
7. ____________ optimization evaluates multiple execution plans and selects the one with
the lowest cost.
Answer: Cost-based
Explanation: Cost-based optimization analyzes different execution strategies and
chooses the most efficient one.
8. A ____________ is a sequence of operations that a DBMS follows to execute a query.
Answer: Query execution plan
Explanation: The query execution plan details the steps taken to retrieve and process
data efficiently.
9. The ____________ step in query decomposition ensures the query is correctly structured
and meaningful.
Answer: Semantic analysis
Explanation: Semantic analysis checks for logical correctness and eliminates
contradictory queries.
10. The ____________ operator in relational algebra is used to filter rows based on a
condition.
Answer: Selection (σ)
Explanation: The selection operator (σ) retrieves rows that meet a specified condition.
11. The ____________ operator in relational algebra is used to select specific columns from
a table.
Answer: Projection (π)
Explanation: The projection operator (π) returns only the specified columns from a
relation.
12. The ____________ step in query processing executes the optimized query and retrieves
the result.
Answer: Query execution
Explanation: After optimization, the DBMS runs the query to fetch the requested data.
13. A ____________ join is most efficient when both tables are sorted on the join attribute.
Answer: Merge
Explanation: Merge join is efficient when both datasets are sorted, reducing comparison
operations.
14. A ____________ join is preferred for handling large datasets by reducing the number of
comparisons.
Answer: Hash
Explanation: Hash join is a common method for efficiently processing large datasets.
15. ____________ pushdown filters rows as early as possible in query execution to reduce
data processing.
Answer: Selection
Explanation: Selection pushdown applies conditions early to reduce the number of rows
being processed.
16. ____________ pushdown reduces the number of columns processed by selecting only
necessary attributes.
Answer: Projection
Explanation: Projection pushdown eliminates unnecessary columns early, improving
efficiency.
17. ____________ is a method used to determine how queries will be executed based on
available indexes and statistics.
Answer: Query optimization
Explanation: Query optimization selects the most efficient strategy for executing a
query.
18. The cost of ____________ refers to the time required to search, read, and write data on
disk.
Answer: Access cost
Explanation: Access cost is the time taken for retrieving or writing data from secondary
storage.
19. In a distributed database, ____________ cost must be minimized to improve query
performance.
Answer: Communication
Explanation: Communication cost includes the time taken to transfer data between
distributed sites.
20. A ____________ scan occurs when a database searches through all rows of a table
instead of using an index.
Answer: Full table
Explanation: A full table scan is inefficient because it processes every row, unlike an
indexed scan.
21. ____________ is the process of breaking down a complex SQL query into smaller query
blocks for easier processing.
Answer: Query decomposition
Explanation: Query decomposition divides a complex SQL query into smaller parts that
can be optimized separately.
22. ____________ is a step in query processing where redundant conditions and operations
are removed.
Answer: Query simplification
Explanation: Query simplification eliminates unnecessary conditions, reducing
computation and improving execution speed.
23. ____________ cost refers to the number of memory buffers required during query
execution.
Answer: Memory usage
Explanation: Memory usage cost is crucial when handling large datasets and optimizing
query performance.
24. ____________ is the process of checking if attribute names and relations in a query exist
in the database schema.
Answer: Query validation
Explanation: Query validation ensures that all references in a query are correct and
meaningful.
25. ____________ is a technique that reduces execution time by rearranging predicate
conditions.
Answer: Predicate reordering
Explanation: Predicate reordering moves more selective conditions earlier in query
execution to minimize unnecessary computations.
26. A ____________ query is one that is embedded inside another query.
Answer: Nested
Explanation: A nested query (or subquery) is executed within another SQL query.
27. A ____________ join retrieves all possible combinations of rows between two tables.
Answer: Cartesian
Explanation: A Cartesian join (cross join) produces all possible row combinations from
two tables.
28. ____________ is the cost of performing in-memory operations such as searching, sorting,
and merging during query execution.
Answer: Computation cost
Explanation: Computation cost includes all operations performed in RAM, such as
sorting and merging.
29. ____________ tables are temporary tables created during query execution to store
intermediate results.
Answer: Temporary
Explanation: Temporary tables store intermediate data that helps in query processing,
especially for complex joins and aggregations.
30. ____________ is the process of choosing the best join order when multiple tables are
involved in a query.
Answer: Join optimization
Explanation: Join optimization selects the best sequence and method for joining tables to
minimize execution time.