Defining Data Restrictions

Objectives

After completing this lesson, you will be able to:

  • Define data restrictions

Data Restrictions

A restriction is a condition in SQL that sets criteria to limit the data returned by a query. You define restrictions on objects to limit the data available to users. Your reasons for limiting user access to data depend on the data requirements of the target user. A user might not need access to all the values returned by an object. You might also want to restrict user access to certain values for security reasons.

The WHERE clause in a SQL statement restricts the number of rows that are returned by the query. So far in your data foundation design work, the restrictions have only been populated by the joins you made between the tables. The joins restrict the result sets, based on equality between tables, and prevent Cartesian products. You can also use the WHERE clause of an object to limit certain users to a query on a subset of the data.

Data Restriction Types

The following types of data restrictions can be used:

  • Data restrictions to objects
  • Data restrictions using filters
  • Data restrictions to tables

Within the design of a data foundation or a business layer, you can either:

  • Force restrictions, which the end user cannot override.

  • Provide optional restrictions, which the end user can choose to apply.

There are often problems associated with forced restrictions. You are advised only to force restrictions where they are absolutely necessary. Remember that users can apply conditions themselves in their reporting tools.

Log in to track your progress & complete quizzes