Database setup and validations