More Related Content Similar to Tutorial Expert How-To - Compare and Merge (20) More from PascalDesmarets1 (14) Tutorial Expert How-To - Compare and Merge2. Model versioning
• Hackolade leverages GIT for powerful and flexible model versioning,
without reinventing the wheel
• Models may diverge in multiple parallel paths before converging
• Old check-out/check-in process which locks modifications by others,
is not flexible enough for agile sprints
• Example:
Copyright © 2016-2023 Hackolade 2
3. Compare and Merge
• Aims to facilitate merge of versions
• Aims to help validate schemas in
production
• e.g. auditing a production database can be done
automatically with the Hackolade Command-
Line Interface to reveal undocumented &
unvalidated data structures, or synchronize
environments (Dev, Test, UAT, Prod)
Copyright © 2016-2023 Hackolade 3
4. Compare and merge
• Subject can be:
• previous reference model,
• model issued from reverse-engineering of a database instance or some
other source,
• model that has evolved in a separate branch in GIT
• Etc.
• Models must be of the same target
• 2 distinct views:
• Compare view: 2 side-by-side panes
• Merge view: 3 panes including preview of the resulting merged model
Copyright © 2016-2023 Hackolade 4
5. Start compare and merge process
• From the Welcome page
• From Tools menu
Copyright © 2016-2023 Hackolade 5
6. Select the models
• Order of left/right is important
• Can be swapped easily
Copyright © 2016-2023 Hackolade 6
7. Compare models
• Synchronised scrolling
• Convention is that LEFT model is basis for comparison
• Addition: in the right model, not in the left model
• Deletion: in the left model, not in the right model
• Also includes cases where left model evolved in parallel to the right model
• Moves: not important in JSON – but convenient for humans
• Modifications: changes in properties of objects
• Objects are marked as additions, deletions, modifications or moves
Copyright © 2016-2023 Hackolade 7
10. Delta model can generate ALTER script
• Depending on the capabilities of the target
Copyright © 2016-2023 Hackolade 10
11. Merge models
• Accessed by toggling the display to the 3 pane view
• Middle pane = merge proposal
• Proposals can be selected and unselected
• When conflicting differences occur, the merge proposal uses by
default the right-hand model value, but can be unchecked by user
• Deletions are retained unless unchecked
Copyright © 2016-2023 Hackolade 11
12. Merge models
• Either create a new file or a new version of a (GIT-enabled) file
Copyright © 2016-2023 Hackolade 12
13. Reading material
• See Hackolade online documentation
• The Hackolade Blog
• This excellent new book:
MongoDB Data Modeling & Schema Design
• Many of the principles in the book are related to query
driven modeling based on access patterns!
• Hackolade’s on social media: LinkedIn page, Twitter page
• Download Hackolade studio for free
Copyright © 2016-2023 Hackolade 13