Which is a major problem with SQL

  1. SQL cannot support object-orientation

  2. The same query can be written in many ways, each with vastly different execution plans

  3. SQL syntax is too difficult for non-computer professionals to use

  4. SQL creates excessive locks within the database


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) SQL cannot support object-orientation - This option is incorrect. SQL is a language specifically designed for managing and manipulating relational databases. While it may not have built-in support for object-oriented features, it can still interact with object-oriented programming languages through various mechanisms.

Option B) The same query can be written in many ways, each with vastly different execution plans - This option is correct. One of the major problems with SQL is that it allows for different ways to write the same query, and each variation can result in a different execution plan. This can lead to performance issues if the query is not optimized properly.

Option C) SQL syntax is too difficult for non-computer professionals to use - This option is incorrect. While SQL may have a learning curve, it is designed to be a declarative language that is relatively easy to understand and use. There are also graphical tools and user-friendly interfaces available that make it more accessible to non-computer professionals.

Option D) SQL creates excessive locks within the database - This option is incorrect. SQL does use locks to manage concurrent access to the database, but it does not inherently create excessive locks. The management of locks and concurrency control is the responsibility of the database management system (DBMS) implementing SQL.

Therefore, the correct answer is B) The same query can be written in many ways, each with vastly different execution plans. This option is correct because the flexibility of SQL can lead to different query variations, and if not optimized properly, it can result in vastly different execution plans with potential performance implications.

Find more quizzes: