Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Latest commit

 

History

History
29 lines (20 loc) · 1.34 KB

schemas.md

File metadata and controls

29 lines (20 loc) · 1.34 KB

Schemas

Introduction

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.

Schema vs Model

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:

Data model

  • 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...)

Data schema

  • 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...)