Data validation and schema design