Patent ID: 9552379
Date: 2017-01-24
CPC Classifications: G06F

Claim:
1. A computer implemented method for foreign key (FK) identification in a databases management system, the method comprising: obtaining a superset of primary key-foreign key (PK-FK) pairs based on a selected schema of a metadata, wherein FK associated with the superset of PK-FK pairs is based on a predefined standard rule and wherein PK associated with the superset of PK-FK pairs is based on a user query, wherein the selected schema comprises one of a structure of a database server described in a formal language supported by DBMS, organization of data to create a blueprint of constructional details of the database server and data that can be received as an input into the database server; computing a threshold value for each of a primary key-foreign key (PK-FK) pair of a superset of PK-FK, wherein the threshold value is based on a standard principle of FK column, and on an analysis of a data type and a length of columns of the superset of PK-FK pairs; generating a sub-set of PK-FK pairs by comparing the computed threshold value with a predefined threshold value, wherein the subset of PK-FK pairs is a subset of the superset of PK-FK pairs, and wherein the predefined threshold value is indicative of an acceptance criterion of the PK-FK pair from the super-set of PK-FK pairs to form the sub-set of PK-FK pairs; computing a cumulative probability distribution (CPD) for each of PK and FK values in the sub-set of PK-FK pairs based on PK and FK columns; determining a conformance score for each of the PK-FK pair of the subset of PK-FK pairs using a statistical function based on Kolmogorov Smirnov Test, wherein the conformance score is the maximum difference between computed corresponding Cumulative Probability Distribution (CPD) values of PK and CPD of FK for each PK-FK pair of the sub-set of PK-FK pairs and wherein the conformance score is computed with respect to a range and a variation for the sub-set of PK-FK pairs; and comparing the conformance score of the each PK-FK pair of the sub-set of PK-FK pairs with a predetermined acceptability index to identify an FK to form a positive PK-FK pair, wherein the predetermined acceptability index is indicative of an acceptance of at least one positive FK from the set of PK-FK pairs.