trailofbits / trailofbits/graphtage

Database structure evolution comparison

Open
#31 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.5k
Forks
61
Avg merge
6h 45m
Merged PRs (30d)
45

Description

Hi,
First I wanted to say that your work is very impressive and I feel could be applied in many different ways!
As you are soliciting possible use cases for this toolset/technology, would a valid use in the database realm be:
Doing a diff between two db schemas and providing the sequential list of edits that will bring you from the origin version to the new version (syncing)? The db schema could be represented as a tree encapsulating the relationship among columns, constraints, tables, indexes, etc.
So for example if a column were to get dropped and that column were referenced as a foreign key constraint to another table as well as being included in an index, the diff would be represented as the series of drops/adds/alters that would enable the edits to be applied to version a sequentially yielding b.

My particular use case is for Oracle DB schema evolution and although there are some costly commercial tools out there, they utilize Oracle specific features in order to accomplish the sync. There don't appear to be any tools that do this type of sync utilizing the approach you have taken with Graphtage that could be applicable across multiple databases. Below are a couple of links describing some of the approaches and the various challenges with schema evolution.

Schema Evolution Research 1
Schema Evolution Research 2
Schema Evolution Research 3

I would be very interested to hear your thoughts on the applicability of this use case to your work.

Regards,
Chris Whelan

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This issue is a use-case proposal for applying Graphtage to database schema evolution and does not identify files, tests, or an implementation entry point. First review Graphtage's existing tree-diff capabilities, then define the schema representation, supported databases, dependency ordering, and acceptance criteria for producing an executable sequence of changes.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.