controlling database access