Database access improvements