EES-4950 Re-model data set version change sets #5089
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR re-models changelogs for data set versions (i.e. v1.1+) towards a more traditional normalised schema (instead of using JSONB). This provides the usual benefits of normalisation (referential integrity, de-duplication) and produces less overhead in terms of the code that needs to be written.
The downside is that larger changelogs can have many changes, potentially resulting in poorer performance than de-normalised JSONB (due to joining across potentially hundreds / thousands of rows).
After a little discussion with @duncan-at-hiveit, we agreed on balance, the benefits of the normalised approach outweighed the downsides. Additionally, any potential performance issues are addressable via caching (e.g. blob cache) of the entire changelog.