Query Processing and Optimization MCQs in DBMS

By: Prof. Dr. Fazal Rehman Shamil | Last updated: September 23, 2024

MCQs on Query Processing and Optimization in DBMS

  1. What is the primary goal of query optimization in a DBMS?A. To minimize the number of queries
    B. To maximize the use of indexes
    C. To minimize the response time and resource usage
    D. To ensure data integrity
    Answer: C. To minimize the response time and resource usage
  2. Which of the following is an example of a logical optimization technique?A. Index selection
    B. Query rewriting using algebraic transformations
    C. Disk scheduling
    D. Buffer management
    Answer: B. Query rewriting using algebraic transformations
  3. What does the term ‘cost-based optimization’ refer to in DBMS?A. Optimization based on user preferences
    B. Optimization based on the structure of the query
    C. Optimization based on the estimated cost of different query execution plans
    D. Optimization based on the data distribution
    Answer: C. Optimization based on the estimated cost of different query execution plans
  4. Which of the following is not typically considered during physical query optimization?A. Index usage
    B. Join methods
    C. Query rewriting
    D. Access paths
    Answer: C. Query rewriting
  5. What is a ‘query execution plan’ in the context of DBMS?A. A logical representation of the query
    B. A sequence of operations that the DBMS will perform to execute the query
    C. A high-level summary of the query
    D. A set of user preferences for the query
    Answer: B. A sequence of operations that the DBMS will perform to execute the query
  6. Which join method is most efficient when one of the tables is very small compared to the other?A. Nested Loop Join
    B. Hash Join
    C. Sort-Merge Join
    D. Index Nested Loop Join
    Answer: A. Nested Loop Join
  7. What does the ‘SELECTIVITY’ of a query refer to?A. The number of joins in the query
    B. The fraction of rows in the table that satisfy the query’s conditions
    C. The number of indexes used by the query
    D. The complexity of the query’s syntax
    Answer: B. The fraction of rows in the table that satisfy the query’s conditions
  8. In query processing, what is ‘pipelining’?A. Executing multiple queries in parallel
    B. Breaking down a query into smaller sub-queries
    C. Passing intermediate results directly to the next operation without writing to disk
    D. Scheduling queries based on their priority
    Answer: C. Passing intermediate results directly to the next operation without writing to disk
  9. Which operator is used to combine the results of two queries into a single result set in SQL?A. JOIN
    B. UNION
    C. INTERSECT
    D. EXCEPT
    Answer: B. UNION
  10. What is the purpose of using ‘statistics’ in query optimization?A. To track user activity
    B. To provide detailed information about data distribution and table usage
    C. To enforce data integrity
    D. To create backups of the database
    Answer: B. To provide detailed information about data distribution and table usage
  11. Which of the following is a heuristic-based optimization technique?A. Cost-based optimization
    B. Rule-based optimization
    C. Dynamic programming
    D. Genetic algorithms
    Answer: B. Rule-based optimization
  12. What is a ‘materialized view’ in the context of query optimization?A. A view that is computed on demand
    B. A view that is stored physically on disk
    C. A view that combines multiple queries
    D. A view that is only accessible to the database administrator
    Answer: B. A view that is stored physically on disk
  13. Which algorithm is used for optimizing complex queries with multiple joins?A. Greedy algorithm
    B. Nested loop algorithm
    C. Dynamic programming algorithm
    D. Brute force algorithm
    Answer: C. Dynamic programming algorithm
  14. In the context of query optimization, what is ‘predicate pushdown’?A. Evaluating predicates as early as possible to reduce the size of intermediate results
    B. Delaying predicate evaluation until the final result is computed
    C. Applying predicates only after sorting the data
    D. Ignoring predicates to speed up query execution
    Answer: A. Evaluating predicates as early as possible to reduce the size of intermediate results
  15. Which of the following is an example of a physical operator in a query execution plan?A. Selection
    B. Projection
    C. Sort
    D. Cartesian product
    Answer: C. Sort

 

More MCQs Of Database Systems

  1. Database Models MCQs in DBMS
    1. Hierarchical model MCQs in DBMS
    2. Network model MCQs in DBMS
    3. Relational model MCQs in DBMS
    4. Object-oriented model MCQs in DBMS
    5. NoSQL databases MCQs in DBMS
  2. Relational Database Model MCQs in DBMS
    1. tables, attributes, tuples, and relations MCQs in DBMS
    2. Primary keys and foreign keys MCQs in DBMS
    3. Integrity constraints MCQs in DBMS
  3. SQL (Structured Query Language) MCQs in DBMS
    1. Data Definition Language (DDL) MCQs in DBMS
    2. Data Manipulation Language (DML) MCQs in DBMS
    3. Data Control Language (DCL) MCQs in DBMS
    4. Transaction Control Language (TCL) MCQs in DBMS
    5. Advanced SQL queries and functions MCQs in DBMS
  4. Database Design MCQs in DBMS
    1. Entity-Relationship (ER) modeling MCQs in DBMS
    2. Extended ER modeling MCQs in DBMS
    3. Normalization and normal forms (1NF, 2NF, 3NF, BCNF) MCQs in DBMS
    4. Denormalization MCQs in DBMS
  5. Database Management System Architecture MCQs in DBMS
    1. Three-schema architecture (external, conceptual, internal) MCQs in DBMS
    2. Data independence MCQs in DBMS
    3. DBMS components and functions MCQs in DBMS
  6. Storage and File Structure MCQs in DBMS
    1. Data storage on physical media MCQs in DBMS
    2. File organization and access methods MCQs
    3. Indexing (B-trees, hash indexing) MCQs in DBMS
    4. RAID technology MCQs in DBMS
  7. Query Processing and Optimization MCQs in DBMS
  8. Database Transaction Management MCQs in DBMS
    1. ACID properties (Atomicity, Consistency, Isolation, Durability) MCQs in DBMS
    2. Transaction states and lifecycle MCQs in DBMS
    3. Concurrency control techniques (locking, timestamping, multiversion) MCQs in DBMS
    4. Deadlock detection and resolution MCQs in DBMS
  9. Database Security and Authorization MCQs in DBMS
    1. Authentication and authorization mechanisms MCQs in DBMS
    2. Data encryption techniques MCQs in DBMS
    3. Role-based access control MCQs in DBMS
    4. SQL injection prevention MCQs in DBMS
  10. Backup and Recovery MCQs in DBMS
    1. Backup types and strategies MCQs in DBMS
    2. Recovery techniques (log-based, shadow paging) MCQs in DBMS
    3. Disaster recovery planning MCQs in DBMS
  11. Distributed Databases MCQs in DBMS
    1. Distributed database architecture MCQs MCQs in DBMS
    2. Data fragmentation, replication, and allocation in DBMS
    3. Distributed query processing MCQs in DBMS
    4. Consistency models and protocols MCQs in DBMS
  1. SET 1: database design mcqs (database design mcqs )
  2. SET 2: database mcqs with answers pdf (database mcqs with answers pdf )
  3. SET 3: modern database management 12th edition mcqs (modern database management 12th edition mcqs)
  4. SET 4: database systems mcqs (database systems mcqs)
  5. SET 5: dbms mcqs (dbms mcqs )
  6. SET 6: dbms mcqs with answers (dbms mcqs with answers)
  7. SET 7: solved mcqs of dbms (solved mcqs of dbms)
  8. SET 8: dbms mcqs with answers pdf(dbms mcqs with answers pdf)
  9. SET 9: relational database management system mcqs(relational database management system mcqs)
  10. SET 10: solved mcqs of database management system(solved mcqs of database management system)
  11. SET 11: basic database mcqs pdf (basic database mcqs pdf)
  12. SET 12: relational database management system mcqs (relational database management system mcqs )
  13. SET 13: database mcqs online test (database mcqs online test)
  14. SET 14: database interview questions mcqs (database interview questions mcqs)
  15. SET 15: database developer mcqs (database developer mcqs)
  16. SET 16: database Repeated mcqs (database Repeated mcqs)
  17. SET 17: Database mcqs PPSC (Database mcqs PPSC)
  18. SET 18: Database mcqs FPSC (Database mcqs FPSC)
  19. SET 19: DBMS mcqs FPSC (DBMS mcqs FPSC)

New Arrival

Database interview questions