发明申请
- 专利标题: Method and apparatus for automatically detecting a latent referential integrity relationship between different tables of a database
- 专利标题(中): 自动检测数据库不同表之间的潜在参照完整性关系的方法和装置
-
申请号: US11326564申请日: 2006-01-05
-
公开(公告)号: US20070156736A1公开(公告)日: 2007-07-05
- 发明人: Robert Bestgen , Shantan Kethireddy , Michael Pfeifer
- 申请人: Robert Bestgen , Shantan Kethireddy , Michael Pfeifer
- 申请人地址: US NY Armonk
- 专利权人: International Business Machines Corporation
- 当前专利权人: International Business Machines Corporation
- 当前专利权人地址: US NY Armonk
- 主分类号: G06F7/00
- IPC分类号: G06F7/00
摘要:
In one aspect, a database analytical tool or function analyzes join queries to detect queries which could be reduced if a referential integrity relationship were known. In another aspect, a probable latent referential integrity relationship is detected using one or more heuristics. Preferably, a join query is analyzed to detect a joined table which has no other conditions placed on it, and no referential integrity relationship already defined. For any such query, the analysis attempts to verify a probable latent referential integrity relationship using at least one heuristic, such as comparing cardinality of the potential primary key with the size of the table and/or with the cardinality of the foreign key. It is further possible to execute the join for some sample of records, and determine whether any records were found which did not conform to referential integrity constraints.
信息查询