Optimized SQL queries for DELETE statements

Relies on the Foreign Key property of ON DELETE CASCADE