When you run a valid SQL SELECT statement, what logical structure does the database return to the client (independent of how it is displayed by tools)?

Difficulty: Easy

Correct Answer: table

Explanation:


Introduction / Context:
SQL queries are declarative: you specify what data you want, and the DBMS returns a structured set of rows and columns. Understanding the nature of that result clarifies how to process it in applications and BI tools.



Given Data / Assumptions:

  • A SELECT statement executes successfully.
  • The database returns data to a client or tool.
  • Presentation layers may format the data for human consumption.


Concept / Approach:
The result of a SELECT is a relation (a table-like structure): a set or multiset of rows, each with the same columns. While GUIs might render reports, grids, or charts, the underlying logical form is a table. Files, forms, or diagrams are external representations, not the SQL result itself.



Step-by-Step Solution:

Consider the structure: rows and columns with defined types and order.Recall terminology: a SELECT returns a result set that is relationally a table.Choose the option that names this logical structure.


Verification / Alternative check:
APIs such as JDBC, ODBC, and ADO.NET expose the result as row/column data sets, reinforcing the table concept.



Why Other Options Are Wrong:

  • Report/form: Presentation artifacts created by separate tools.
  • File: A storage container; SQL results can be exported to files but are not files by definition.
  • Diagram: A visualization, not a data structure returned by SQL.


Common Pitfalls:
Confusing what the client tool shows with the underlying data structure. The result is always tabular even if later pivoted or charted.



Final Answer:
table

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion