Patent ID: 7664790

Claim:
A method to process cascading deletes in a relational database, comprising: loading one or more tables into memory, wherein each table comprises one or more rows and at least one of said tables is a parent table and at least one of said tables is a child table; obtaining a foreign key index for each loaded child table; logging, to an error file, all primary key errors detected during the act of loading one or more tables into memory; probing each relevant foreign key index to identify all loaded rows that violate a referential constraint due to a primary key error, such referential constraint violation being a foreign key error, wherein the act of probing is performed without accessing the child table associated with the foreign key index being probed and wherein the act of probing further comprises— obtaining a primary key error record, determining a primary key value associated with the primary key error record, using the primary key value to probe each foreign key index associated with a table that is dependent to the table associated with the primary key value, and identifying those rows identified by each foreign key index entry obtained as a result of said probing; logging all identified foreign key errors to the error file; and using the error file contents to identify, mark and delete loaded table rows that violate a referential constraint.