Method and mechanism for tracking dependencies for referential integrity constrained tables
AssigneeOracle International Corporation
InventorsAmit Ganesh, Jonathan D. Klein
Life of this patent
Estimating the term…
Abstract
A method and mechanism for dependency tracking in a database system is disclosed. According to an embodiment, dependency tracking for a referentially constrained object is performed by tracking change or commit time values for key ranges as well as change or commit time values at various granularities in the database. The combination of various sets of change or commit values are employed to determine a single value representing all prior transactions or changes that an operation is dependent upon.
Claims44
A process for tracking dependencies for referential integrity constrained tables in a database system, comprising:
- identifying a foreign key range in a set of foreign key ranges for a child table;
- maintaining a data structure to hold latest commit time information for said foreign key range;
- deleting a child row from said child table at a commit time, said child row having a foreign key value within said foreign key range;
- updating said data structure based upon said commit time;
- executing a delete operation against a parent row from a parent table, said parent row having a referenced key value within said foreign key range;
- and
- determining a dependency value for said delete operation based upon said commit time stored in said data structure.
A process for tracking dependencies for referential integrity constrained tables in a database system, comprising:
- tracking a first row commit time for a parent row in a parent table, said first row commit time corresponding to a committed operation performed against said parent row, said parent row comprising a referenced key value;
- executing an insert operation against a child row in a child table, said child row having a foreign key value corresponding to said referenced key value;
- and
- determining a dependency value for said insert operation based upon said first row commit time for said parent row.
A process for tracking dependencies for referential integrity constrained tables in a database system, comprising:
- tracking a first commit time for a parent row in a parent table, said first row commit time corresponding to a committed operation performed against said parent row, said parent row comprising a referenced key value;
- identifying a foreign key range in a set of foreign key ranges for a child table;
- tracking a second commit time based upon deletion of a child row from said child table at said second commit time, said child row having a foreign key value within said foreign key range;
- determining a first dependency value for an insert operation that inserts a new child row having a foreign key value corresponding to said referenced key, said first dependency value based upon said first commit time for said parent row;
- and
- determining a second dependency value for a delete operation that deletes an existing parent row from said parent table, said existing parent row having an existing referenced key value within said foreign key range, said second dependency value based upon said second commit time.
A computer program product that includes a computer-usable medium having a sequence of instructions which, when executed by a processor, causes said processor to execute a process for tracking dependencies for referential integrity constrained tables in a database system, said process comprising:
- identifying a foreign key range in a set of foreign key ranges for a child table;
- maintaining a data structure to hold latest commit time information for said foreign key range;
- deleting a child row from said child table at a commit time, said child row having a foreign key value within said foreign key range;
- updating said data structure based upon said commit time;
- executing a delete operation against a parent row from a parent table, said parent row having a referenced key value within said foreign key range;
- and
- determining a dependency value for said delete operation based upon said commit time stored in said data structure.
A computer program product that includes a computer-usable medium having a sequence of instructions which, when executed by a processor, causes said processor to execute a process for tracking dependencies for referential integrity constrained tables in a database system, said process comprising:
- tracking a first row commit time for a parent row in a parent table, said first row commit time corresponding to a committed operation performed against said parent row, said parent row comprising a referenced key value;
- executing an insert operation against a child row in a child table, said child row having a foreign key value corresponding to said referenced key value;
- and
- determining a dependency value for said insert operation based upon said first row commit time for said parent row.
A computer program product that includes a computer-usable medium having a sequence of instructions which, when executed by a processor, causes said processor to execute a process for tracking dependencies for referential integrity constrained tables in a database system, said process comprising:
- tracking a first commit time for a parent row in a parent table, said first row commit time corresponding to a committed operation performed against said parent row, said parent row comprising a referenced key value;
- identifying a foreign key range in a set of foreign key ranges for a child table;
- tracking a second commit time based upon deletion of a child row from said child table at said commit time, said child row having a foreign key value within said foreign key range;
- determining a first dependency value for an insert operation that inserts a new child row having a foreign key value corresponding to said referenced key, said first dependency value based upon said first commit time for said parent row;
- and
- determining a second dependency value for a delete operation that deletes an existing parent row from said parent table, said existing parent row having an existing referenced key value within said foreign key range, said second dependency value based upon said second commit time.
Dependencies are inferred from the claim text.