1. A method for secure data access in a data processing system, the method comprising: providing a relational database having a first table and a second table, wherein a sensitive attribute serves as subset of a primary key for the first and second tables; generating a first security view, the first security view granting a user access to the sensitive attribute values of the first table in a masked format, wherein the masked format value is generated from an unmasked format value using a reversible function; generating a second security view, the second security view granting the user access to the sensitive attribute values of the second table in a masked format, wherein the masked format value is generated from an unmasked format using a reversible function; and performing a join operation between the first view and the second view by optimizing a first query statement corresponding to the join operation.