IP Library › Granted Patent US 12,461,899
Granted Patent B2
US 12,461,899 · App. 17/725,968 · Granted Nov 4, 2025

Automatic sequencing of database objects

Inventors: Jahangeer Pasha Mohammed (Milton, CA); Polu Ram Charan Teja (Hyderabad, IN)
Assignee: Dell Products L.P.
G06F16/212G06F9/4881
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 12,461,899
App. No.
17/725,968
Granted
Nov 4, 2025
Kind
B2
Abstract

Methods, apparatus, and processor-readable storage media for automatically sequencing database objects are provided herein. An example computer-implemented method includes obtaining one or more database scripts to be executed on at least one database, wherein each database script is associated with one or more database objects; for each of the database scripts: parsing the database script to identify object information corresponding to the one or more database objects associated with the database script, and determining one or more dependencies of the one or more database objects based at least in part on the object information; automatically determining an order to execute the one or more database scripts based at least in part on the object dependencies of the one or more database objects determined for each of the database scripts; and initiating an execution the one or more database scripts in accordance with the determined order.

Claims (53)

1 . A computer-implemented method comprising:

obtaining two or more database scripts to be executed on at least one database, wherein each database script is associated with one or more database objects and comprises at least one value indicative of an order in which the database script is to be executed, and wherein the at least one value for at least two of the database scripts comprises a same value that creates a conflict in an execution order of the two or more database scripts;

determining that at least one of the database scripts is associated with two or more database object types and, in response, dividing the at least one database script into multiple parts, wherein each of the parts corresponds to one of the two or more database object types;

for each of the two or more database scripts: parsing the database script to identify object information corresponding to the one or more database objects associated with the database script, and determining one or more dependencies of the one or more database objects based at least in part on the object information, wherein at least one of the one or more database objects for at least one of the two or more database scripts comprises a new database object that does not exist in the at least one database, and wherein the determining comprises: (i) obtaining information corresponding to dependent objects and dependency levels associated with the new database object based on one or more reference keys associated with the new database object and (ii) recursively identifying one or more dependencies for the new database object based at least in part on the obtained information;

automatically adjusting the order in which the two or more database scripts are to be executed to resolve the conflict in the execution order, wherein the adjusting is based at least in part on the object dependencies of the one or more database objects determined for each of the two or more database scripts; and

initiating an execution of the two or more database scripts in accordance with the adjusted order;

wherein the method is performed by at least one processing device comprising a processor coupled to a memory.

2 . The computer-implemented method of claim 1 , wherein the execution of the two or more database scripts comprises applying changes to the at least one database with respect to the one or more database objects in the adjusted order.

3 . The computer-implemented method of claim 1 , wherein the object information comprises at least one of: one or more object types, one or more object names, and one or more object operations.

4 . The computer-implemented method of claim 1 , wherein the determining the one or more dependencies of the one or more database objects comprises:

determining that at least one of the one or more database objects exists in the at least one database;

obtaining a list of dependent objects that exist in the at least one database, wherein obtaining the list of dependent objects that exist in the at least one database comprises querying an all dependencies table of the at least one database; and

comparing the list of dependent objects to the object information.

5 . The computer-implemented method of claim 1 , wherein the determining the one or more dependencies for the new database object comprises:

identifying the one or more reference keys associated with the new database object based on the object information.

6 . The computer-implemented method of claim 5 , wherein at least one of:

the one or more reference keys comprise at least one of: one or more foreign keys and one or more primary keys; and

the determining the one or more dependencies of the new database object further comprises generating a dependency hierarchy for the new database object based at least in part on the obtained information.

7 . The computer-implemented method of claim 1 , wherein the parsing is based at least in part on a set of keywords corresponding to a database scripting language.

8 . The computer-implemented method of claim 1 , wherein the obtaining the information corresponding to the dependent objects and the dependency levels associated with the new database object is based on a combination of one or more foreign keys and one or more primary keys.

9 . The computer-implemented method of claim 1 , wherein the dependency levels associated with the new database object comprise:

a first dependency level comprising database objects having no dependencies; and

one or more second dependency levels comprising database objects having one or more foreign key references.

10 . The computer-implemented method of claim 1 , wherein the at least one value indicative of the order in which the database script is to be executed corresponds to a filename prefix.

11 . The computer-implemented method of claim 1 , wherein the parsing the database script further comprises parsing the database script into one or more data definition language operations and one or more data manipulation language operations, and wherein the one or more data manipulation language operations and the one or more data definition language operations are separated, based on a type of the operations, for determining the one or more dependencies.

12 . A non-transitory processor-readable storage medium having stored therein program code of one or more software programs, wherein the program code when executed by at least one processing device causes the at least one processing device:

to obtain two or more database scripts to be executed on at least one database, wherein each database script is associated with one or more database objects and comprises at least one value indicative of an order in which the database script is to be executed, and wherein the at least one value for at least two of the database scripts comprises a same value that creates a conflict in an execution order of the two or more database scripts;

to determine that at least one of the database scripts is associated with two or more database object types and, in response, to divide the at least one database script into multiple parts, wherein each of the parts corresponds to one of the two or more database object types;

for each of the two or more database scripts: to parse the database script to identify object information corresponding to the one or more database objects associated with the database script, and to determine one or more dependencies of the one or more database objects based at least in part on the object information, wherein at least one of the one or more database objects for at least one of the two or more database scripts comprises a new database object that does not exist in the at least one database, and wherein the determining comprises: (i) obtaining information corresponding to dependent objects and dependency levels associated with the new database object based on one or more reference keys associated with the new database object and (ii) recursively identifying one or more dependencies for the new database object based at least in part on the obtained information;

to automatically adjust the order in which the two or more database scripts are to be executed to resolve the conflict in the execution order, wherein the adjusting is based at least in part on the object dependencies of the one or more database objects determined for each of the two or more database scripts; and

to initiate an execution of the two or more database scripts in accordance with the adjusted order.

13 . The non-transitory processor-readable storage medium of claim 12 , wherein the execution of the two or more database scripts comprises applying changes to the at least one database with respect to the one or more database objects in the adjusted order.

14 . The non-transitory processor-readable storage medium of claim 12 , wherein the object information comprises at least one of: one or more object types, one or more object names, and one or more object operations.

15 . The non-transitory processor-readable storage medium of claim 12 , wherein the determining the one or more dependencies of the one or more database objects comprises:

determining that at least one of the one or more database objects exists in the at least one database;

obtaining a list of dependent objects that exist in the at least one database, wherein obtaining the list of dependent objects that exist in the at least one database comprises querying an all dependencies table of the at least one database; and

comparing the list of dependent objects to the object information.

16 . The non-transitory processor-readable storage medium of claim 12 , wherein the determining the one or more dependencies for the new database object comprises:

identifying the one or more reference keys associated with the new database object based on the object information.

17 . An apparatus comprising:

at least one processing device comprising a processor coupled to a memory;

the at least one processing device being configured:

to obtain two or more database scripts to be executed on at least one database, wherein each database script is associated with one or more database objects and comprises at least one value indicative of an order in which the database script is to be executed, and wherein the at least one value for at least two of the database scripts comprises a same value that creates a conflict in an execution order of the two or more database scripts;

to determine that at least one of the database scripts is associated with two or more database object types and, in response, to divide the at least one database script into multiple parts, wherein each of the parts corresponds to one of the two or more database object types;

for each of the two or more database scripts: to parse the database script to identify object information corresponding to the one or more database objects associated with the database script, and to determine one or more dependencies of the one or more database objects based at least in part on the object information, wherein at least one of the one or more database objects for at least one of the two or more database scripts comprises a new database object that does not exist in the at least one database, and wherein the determining comprises: (i) obtaining information corresponding to dependent objects and dependency levels associated with the new database object based on one or more reference keys associated with the new database object and (ii) recursively identifying one or more dependencies for the new database object based at least in part on the obtained information;

to automatically adjust the order in which the two or more database scripts are to be executed to resolve the conflict in the execution order, wherein the adjusting is based at least in part on the object dependencies of the one or more database objects determined for each of the two or more database scripts; and

to initiate an execution of the two or more database scripts in accordance with the adjusted order.

18 . The apparatus of claim 17 , wherein the execution of the two or more database scripts comprises applying changes to the at least one database with respect to the one or more database objects in the adjusted order.

19 . The apparatus of claim 17 , wherein the object information comprises at least one of: one or more object types, one or more object names, and one or more object operations.

20 . The apparatus of claim 17 , wherein the determining the one or more dependencies of the one or more database objects comprises:

determining that at least one of the one or more database objects exists in the at least one database;

obtaining a list of dependent objects that exist in the at least one database, wherein obtaining the list of dependent objects that exist in the at least one database comprises querying an all dependencies table of the at least one database; and

comparing the list of dependent objects to the object information.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2022
From: MOHAMMED, JAHANGEER PASHA; TEJA, POLU RAM CHARAN
To: DELL PRODUCTS L.P.
Reel/Frame 059667/0273 →
Continuity (1)
Related Publication 20230342341A1 · Oct 26, 2023
References Cited (33)
US 6985901B1 · Sachse · 2006 [cited by examiner]
US 9547675B2 · Bostock · 2017 [cited by applicant]
US 9582606B2 · Pitschke · 2017 [cited by applicant]
US 10061678B2 · Jovanovic et al. · 2018 [cited by applicant]
US 10776330B2 · Bregler et al. · 2020 [cited by applicant]
US 11301451B1 · Cseri et al. · 2022 [cited by applicant]
US 20010049682A1 · Vincent · 2001 [cited by examiner]
US 20040249830A1 · Sonkin · 2004 [cited by examiner]
US 20070055693A1 · Galbraith · 2007 [cited by examiner]
US 20150019479A1 · Buehne · 2015 [cited by examiner]
US 20150019497A1 · Bostock · 2015 [cited by applicant]
US 20150149421A1 · Foebel et al. · 2015 [cited by applicant]
US 20150161181A1 · Doms · 2015 [cited by applicant]
US 20160036858A1 · Chieu et al. · 2016 [cited by applicant]
US 20160292210A1 · Panse et al. · 2016 [cited by applicant]
US 20160378634A1 · Jovanovic et al. · 2016 [cited by applicant]
US 20170019314A1 · Chieu · 2017 [cited by applicant]
US 20170068692A1 · Bostock · 2017 [cited by applicant]
US 20170103100A1 · Sharma et al. · 2017 [cited by applicant]
US 20170180205A1 · Baset et al. · 2017 [cited by applicant]
US 20180210910A1 · Collins et al. · 2018 [cited by applicant]
US 20190005074A1 · Bregler et al. · 2019 [cited by applicant]
US 20190026320A1 · Sharma · 2019 [cited by examiner]
US 20190179934A1 · Gogineni et al. · 2019 [cited by applicant]
US 20190196890A1 · Bucchi et al. · 2019 [cited by applicant]
US 20190384847A1 · Bobbala · 2019 [cited by examiner]
US 20200334244A1 · Hammerschmidt · 2020 [cited by examiner]
US 20210034474A1 · Khandkar · 2021 [cited by examiner]
US 20210182248A1 · Jayanthi · 2021 [cited by applicant]
US 20220137937A1 · Saha · 2022 [cited by applicant]
US 20230281173A1 · Jaisawal · 2023 [cited by applicant]
SQL Change Automation 4 Documentation, Pre-deployment and post-deployment scripts, Red Gate Software Ltd, available at: https://documentation.red-gate.com/sca/developing-databases/concepts/migrations/pre-deployment-and-… [cited by applicant]
Walker, Bob, available at: https://octopus.com/blog/dbup-database-deployment-automation (last accessed Apr. 21, 2022), Mar. 24, 2020. [cited by applicant]