Patent ID: 7930291

Claim:
A method to process a constraint in a database having a parent table and a child table wherein the parent table and the child table are related through the constraint, comprising: generating a first index record for each loaded row of data associated with the parent table, each of said first index records including a first table identifier value identifying the parent table, a first key value associated with the row of data and a first flag value; generating a second index record for each loaded row of data associated with the child table, each of said second index records including a second table identifier value identifying the parent table, a second key value associated with the row of data and a second flag value; sorting the first index records and the second index records so that all second index records having the same second table identifier value and second key value are grouped together and, collectively, immediately adjacent to zero or one first index record whose first table identifier value corresponds to the second table identifier of the second index records and further wherein the first key value of the first index record corresponds to the second key value of the second index records; and deleting those child table rows associated with each second index record whose second table identifier value and second key value do not match the first table identifier and first key value of an immediately prior first index record.