Data filter example

Suppose that you provide database administration services for several hospitals in your state. For administrative purposes, patient statistics are kept in a master table that tracks data from all hospital sites that you administer. Nurses and doctors within each hospital need access to the PATIENTS table, but they need only the rows that contains the data of the patients in their hospital. To handle the needs of each hospital, you can create a data filter that specifies the subset of data that each group can access.

Because only subsets of the table are replicated, data filters help improve synchronization performance and provide security for group-specific data.

For example, to set a data filter for East side hospital, the parameter name and value might be something like this:

Parameter Name = :Hospital
Default Value = Eastside

The data filter for Foothill hospital on the west side might look something like this:

Parameter Name = :Hospital
Default Value = Foothill

You can also set data filters for individual users by using a DB2 variable instead of a hard-coded value for the parameter name. You then enter a data filter value when you create each user. In this case, the group filter might look something like this:

Parameter Name = :Hospital
Default Value = None

Then you would assign values for the individual user filters as explained in Filtering the data available to the user.

Related concepts

Related tasks