1. A computer implemented method to identify a primary key and foreign key relationship using metadata of a data source, the computer implemented method comprising: identifying a pair of metadata from the data source for comparison; identifying a phonetic code of each of the pair of metadata, wherein the phonetic code may be defined by a predefined phonetic rules; comparing the phonetic code of the pair of metadata to determine a phonetic disparity score, wherein the phonetic disparity score is indicative of a measure of phonetic difference between the pair of metadata; comparing a string sequence of the pair of metadata to determine a string comparison score, wherein the string comparison score is indicative of a difference in string structure of each of the pair of metadata; determining compliance of the pair of metadata to a predefined set of constraints; and determining the primary key and foreign key relationship based on the compliance of the pair of metadata, the phonetic disparity score, and the string comparison score.
7. The computer implemented method as claimed in claim 1 , wherein the string comparison score is compared to a string threshold to determine whether the string comparison score is within the string threshold.