A statistical database system is a system that contains information about individuals, companies or organisations that enables authorized users to retrieve aggregate statistics such as mean and count. The regulation of a statistical database involves limiting the use of the database so that no sequence of queries is sufficient to infer protected information about an individual. The database is said to be compromised when individual confidential information is obtained as a result of a statistical query. Devices to protect against compromise include adding noise to the data or restricting a query. While effective, these techniques are sometimes too strong in that legitimate compromises for reasons of public safety are always blocked. Further, a statistical database can be often be compromised with some knowledge about the database attributes (working knowledge), the real world (supplementary knowledge) or the legal system (legal knowledge). In this paper we illustrate that a knowledge based system that represents working, supplementary and legal knowledge can contribute to the regulation of a statistical database.