Working with security within a database