(A business analyst queries the same few tables every quarter and does not want to write new SQL code every time. Which of the following would best support the business analyst's needs and allow the database administrator to optimize disk space?)
Correct Answer: B
The correct answer is B. View. CompTIA DataSys+ documentation explains that views are virtual tables created from stored SQL queries that present data from one or more underlying tables without physically storing the data themselves. This makes views an ideal solution when users repeatedly query the same datasets and want consistent results without rewriting SQL statements.
In this scenario, the business analyst runs the same queries every quarter. By using a view, the analyst can simply query the view as if it were a table, eliminating the need to re-create complex SQL joins, filters, or aggregations each time. From a usability standpoint, views simplify access to data and reduce the likelihood of query errors, which aligns with DataSys+ objectives related to usability and abstraction.
From the database administrator's perspective, views also help optimize disk space. Because views do not store data physically (unlike tables), they consume minimal storage while still providing a reusable query structure. This is especially important in environments where storage efficiency and performance tuning are key responsibilities of the DBA.
Option A, a table, would require duplicating data, increasing disk usage and maintenance overhead. Option C, a function, is typically used to return a calculated value and is not designed to represent reusable multi-row query results for reporting purposes. Option D, a stored procedure, can encapsulate logic and queries, but it is generally used for executing operations rather than providing a simple, queryable dataset for analysts. Stored procedures may also introduce additional complexity and are less intuitive for ad-hoc querying.
CompTIA DataSys+ emphasizes views as a best practice for abstraction, security, and efficiency. They support repeated reporting needs while preserving storage resources and simplifying database management.
Therefore, B. View is the most accurate and fully aligned answer.
Guage