Patent ID: 8719233

Claim:
A method of sanitizing a database comprising: identifying tables of sensitive data; identifying columns of entries in the identified tables having sensitive entries; defining, for each column in the identified column, a scrubbing operation for overwriting sensitive data in the respective column; identifying relations between the identified tables, the relations identifying corresponding values between different tables; computing an ordering of the columns, the ordering indicative of dependencies between the tables defined by the relations; generating a scrubbing entry for each identified column, the scrubbing entry indicative of a scrubbing operation, replacement value, and ordering of the scrubbing entry; generating, for each generated scrubbing entry, a SQL script for performing the defined scrubbing operation; determining if the entries in a particular one of the identified columns are control values employed in successive computations; computing, based on the determining, a scrubbing operation for a particular one of the identified columns, the scrubbing operation including one or more of specifying, if the entries are control values, a benign value for overwriting sensitive data in the respective column, and truncating, if the entries are not control values, the sensitive data; and performing, for each identified column, the defined scrubbing operation on the entries in the identified column, the scrubbing operations performed according to the computed ordering.