Data schemas are abstractions wrapping database model definitions which are used for data serialization and deserialization across multiple software components. These operations are the standard way of interchanging information between far-away components using the internet.
There exists a relationship between this package data schemas and the core package data models, such that every schema depends on the data model defined columns to define their own fields. Alternatively, there could be model-independent schemas whose only purpose would be to exchange compatible data, without storing it. That is not the case.
When comparing the nature of a data schema against a data model, consider:
- It defines how information is stored in the persistent layer (databases).
- It defines storage properties such as indexes, relationships and constraints.
- It performs storage validation (i.e. unique within the table, foreign key exists...)
- It defines how data model compliant records must be serialized / deserialized.
- It could populate / augment certain data fields from the context / other fields.
- If performs data quality validations (i.e. valid format, not null value...)