Databases help the police and judiciary to fight crime. Data mining, however, should not result in ethnic profiling or discrimination. This project researched how discrimination on the basis of data mining by the police and judiciary can be prevented.The researchers demonstrated that the algorithms currently being used lead to a number of discriminatory effects. Simply removing sensitive data, such as gender and ethnicity, did not solve the issue. Newly developed algorithms tested with real data, however, do prevent discrimination but also provide a realistic picture of the distribution of crime and the risk that people will commit an offence.