1. A computer-readable medium having computer-executable instructions for causing a computer to perform steps comprising: extracting values from an XML document; identifying head elements; identifying first level out-references; retrieving references that potentially participate in an identity constraint; storing the reference information; and generating an identity constraint graph from the stored reference information.