2.3 Row Level Security
Row level security is a fundamental database concept. It is a very
common practice to restrict user access to data such that, for
instance, a user is only able to view or modify the row or rows of
data that correspond to them. For instance, when a student registers
for a course, they should only be able to access their own personal
information. A common way to implement row level security is
through the use of views. A prototype animation depicting the
construction of views is shown in Figure 4. In a data window, table
data is shown as well as the SQL code for creating a view. In the
input window, a user is able to make a choice from a dropdown box.
This choice is used to restrict the data which will be displayed. The
output window displays the results of the view given the selections
made by the user. In the example, User Jones is logged in, and
issues a query to the view DATA.Student_view (Student_View in
the Data Schema), which returns just the row corresponding to
Jones (Students.LastName = ‘Jones’) in the output window. As the
username is modified in the input window, a different row is
displayed in the output window. This animation illustrates the
concept of schema and view as well as row level security.
Enhancements to this sub-module include column level security as
well as update operations.