IP Library Granted Patent US 10,540,371
Granted Patent B2
US 10,540,371 · App. 15/724,333 · Granted Jan 21, 2020

Systems and methods for synchronizing database schema

Inventors: Joshua Ledbetter (Bentonville, AR); Daniel Bryan Austin (Bentonville, AR)
Assignee: Walmart Apollo, LLC
G06F16/27G06F16/213G06F16/2379
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,540,371
App. No.
15/724,333
Granted
Jan 21, 2020
Kind
B2
Abstract

Methods and systems for synchronizing a database schema (or data structure) of a source database to a target database are disclosed. A source data structure definition is generated, including definitions of each object in the source database structure. A target database structure is generated, including definitions of each object in the source database structure. Object definitions are compared between the source database structure and the target database structure. A data definition language change instruction sequence is generated that, when executed, will modify the target database structure to correspond to the data structure definition. The change instruction sequence is executed on the target database.

Claims (42)

1. A method for updating a target database structure of a target database based on a source data structure of a source database, the target database structure and the source database structure each having one or more objects, the method comprising:

generating a data structure definition, the data structure definition having an object definition for each of the one or more objects of the source data structure;

comparing each object definition to the one or more objects in the target database structure;

generating one or more creation actions for each object definition that does not have a corresponding object in the target database structure;

generating one or more modification actions for each object definition that differs from a corresponding object in the target database structure;

generating one or more deletion actions for each object in the target database structure that does not have a corresponding object definition;

generating a data definition language change instruction sequence from the generated creation actions, modification actions, and deletion actions that, when executed, will modify the target database structure to correspond to the data structure definition;

executing the change instruction sequence on the target database; and

providing an output regarding a status of the executing of the change instruction sequence.

2. The method of claim 1 , further comprising:

determining a set of data items in the target database that will be affected by the one or more change actions or one or more deletion actions.

3. The method of claim 2 , further comprising:

reporting the set of data items in the target database that will be affected by the one or more change actions or one or more deletion actions to a user, and requesting confirmation from the user before generating the change instruction sequence.

4. The method of claim 1 , further comprising:

determining a difference count from the change instruction sequence,

wherein executing the change instruction sequence on the target database includes decrementing the difference count for each change instruction executed; and further wherein providing an output regarding the status of the execution of the change instruction sequences includes reporting the current different count.

5. The method of claim 1 , further comprising:

generating a data definition language backout instruction sequence from the change instruction sequence whereby executing the backout instruction sequence will reverse any changes made by execution of the change instruction sequence.

6. The method of claim 1 , wherein the change instruction sequence is generated in an optimized order to prevent failure of the execution of the change instruction sequence.

7. The method of claim 1 , wherein each of the one or more object definitions includes one or more of a name, a type, a size, a storage space name, or a locale indicator.

8. The method of claim 7 , wherein the modification instructions for each object definition that differs from a corresponding object in the target database by name include a temporary renaming action to modify the name of the corresponding object in the target database to a temporary name and a final renaming action to modify the name of the corresponding object in the target database to the name of the object definition.

9. The method of claim 8 , wherein the change instruction sequence is generated to execute all temporary renaming actions before any final renaming actions.

10. The method of claim 1 , wherein the data structure definition is associated with a database structure version.

11. A database structure update system for updating a target database structure of a target database based on a source data structure of a source database, the target database structure and the source database structure each having one or more objects, the system comprising:

a data structure definition extractor communicatively coupled to the source database and configured to generate a data structure definition, the data structure definition having an object definition for each of the one or more objects of the source data structure;

a comparator communicatively coupled to the target database and configured to receive the data structure definition, compare each object definition to the one or more objects in the target database structure, and to:

generate one or more creation actions for each object definition that does not have a corresponding object in the target database structure,

generate one or more modification actions for each object definition that differs from a corresponding object in the target database structure, and

generate one or more deletion actions for each object in the target database structure that does not have a corresponding object definition;

a data definition language generator configured to generate a data definition language change instruction sequence from the generated actions instructions, modification actions, and deletion actions that, when executed will modify the target database structure to correspond to the data structure definition; and

a deployment engine communicatively coupled to the target database and to a user interface and configured to execute the change instruction sequence on the target database, and to provide an output to the user interface regarding the status of the execution of the change instruction sequence.

12. The system of claim 11 , wherein the comparator is further configured to determine a set of data items in the target database that will be affected by the one or more change actions or one or more deletion actions.

13. The system of claim 12 , wherein the comparator is further configured to report the set of data items in the target database that will be affected by the one or more change actions or one or more deletion actions to the user.

14. The system of claim 11 , wherein the comparator is further configured to determine a difference count from the change instruction sequence, and

wherein the deployment engine is further configured to decrement the difference count for each change instruction executed; and further wherein providing an output regarding the status of the execution of the change instruction sequences includes reporting the current different count.

15. The system of claim 11 , wherein the data definition language generator is further configured to:

generate a data definition language backout instruction sequence from the change instruction sequence whereby executing the backout instruction sequence will reverse any changes made by execution of the change instruction sequence.

16. The system of claim 11 , wherein the change instruction sequence is generated in an optimized order to prevent failure of the execution of the change instruction sequence.

17. The system of claim 11 , wherein each of the one or more object definitions includes one or more of a name, a type, a size, a storage space name, or a locale indicator.

18. The system of claim 17 , wherein the modification instructions for each object definition that differs from a corresponding object in the target database by name include a temporary renaming action to modify the name of the corresponding object in the target database to a temporary name and a final renaming action to modify the name of the corresponding object in the target database to the name of the object definition.

19. The system of claim 18 , wherein the data definition language generator is further configured to generate the change instruction sequence to execute all temporary renaming actions before any final renaming actions.

20. The system of claim 11 , wherein the data structure definition is associated with a database structure version.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 30, 2018
From: WAL-MART STORES, INC.
To: WALMART APOLLO, LLC
Reel/Frame 045949/0126 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 9, 2017
From: LEDBETTER, JOSHUA; AUSTIN, DANIEL
To: WAL-MART STORES, INC.
Reel/Frame 043812/0858 →
Continuity (2)
Provisional Application 62404349 · Oct 5, 2016
Related Publication 20180096043A1 · Apr 5, 2018