implements some Database function helpers