Patent ID: 9449067
Filing Date: 2016-09-20
CPC Classification: G06F

Claim Text:
1. A method to process a constraint in a database having a table that is both a parent and a child with respect to a referential constraint relationship, comprising: generating a primary index record for each loaded row of data associated with a parent table, each of said primary index records including a table identifier, a primary key associated with the row of data, and a first flag value; generating a referential index record for each loaded row of data associated with a child table, each of said referential index records including a parent table identifier, a foreign key associated with the row of data, and a second flag value, the second flag value having a value different than the first flag value; sorting the primary index records and the referential index records based on the table identifier, the primary key, and the first flag value of the primary index records, and the parent table identifier, the foreign key, and the second flag value of the referential index records, wherein, by selecting the first flag value to be different than the second flag value, referential index records associated with the child table having the same foreign key are grouped together and one primary index record whose primary key corresponds to the foreign key of the referential index records immediately precedes the group of referential index records; and deleting those rows associated with each referential index record whose foreign key does not match the primary key of an immediately prior primary index record.