How do you perform database validation to ensure that data processed by an API is correctly stored in the backend?