DS0-001 · Question #14
A database administrator needs to provide access to data from two different tables to multiple group users in order to facilitate ongoing reporting. However, some columns in each table are…
The correct answer is B. Create a view. Creating a view is the best solution. A view is a saved SQL query that can join the two tables and SELECT only the non-restricted columns, effectively hiding sensitive data. Users are then granted SELECT permission on the view rather than on the underlying tables, so they never…
Question
A database administrator needs to provide access to data from two different tables to multiple group users in order to facilitate ongoing reporting. However, some columns in each table are restricted, and users should not be able to see the values in these columns. Which of the following is the best action for the administrator to take?
Options
- ACreate a stored procedure.
- BCreate a view.
- CCreate a .csv export.
- DCreate a trigger.
How the community answered
(34 responses)- A3% (1)
- B76% (26)
- C15% (5)
- D6% (2)
Explanation
Creating a view is the best solution. A view is a saved SQL query that can join the two tables and SELECT only the non-restricted columns, effectively hiding sensitive data. Users are then granted SELECT permission on the view rather than on the underlying tables, so they never see the restricted columns and cannot query the base tables directly. A stored procedure (A) is designed for executing procedural logic, not column-level access control for read reporting. A CSV export (C) is a one-time data export and not a scalable, secure access mechanism. A trigger (D) fires on data modification events and is unrelated to restricting read access to specific columns.
Topics
Community Discussion
No community discussion yet for this question.