Intelligent Enforcement of Fine-Grained Access Control Policies for SQL Queries. Master thesis.