Patent ID: 8065323

Claim:
A non-transitory machine readable medium storing one or more sequences of instructions for causing a digital processing system to validate foreign key constraints on data stored in a database system, wherein execution of said one or more sequences of instructions by one or more processors contained in said system causes said system to perform the actions of: populating data in a database of said database system without enforcement of foreign key constraints defined for said database; identifying a foreign key constraint defined for said database, wherein said foreign key constraint comprises a foreign key column in a detail table and a primary key column in a master table, wherein said digital processing system examines data representing a schema of said database and generates an output indicating that said foreign key column and said primary key column comprises said foreign key constraint; generating, based on said output generated by said identifying, a script designed to retrieve and verify whether the data values stored in said foreign key column of said detail table are present in said primary key column of said master table; and executing said script on said database system to determine whether data stored in said database satisfies said foreign key constraint, wherein execution of said script causes retrieval of data values stored in both of said detail table and said master table, wherein said script is executed offline after completion of said populating.