add some database validations