improving code readability by using pre defined booleans for SQL