Database Key Relationship Determination via Sampling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for determining composite primary-foreign key relationships between large database tables are time-consuming and do not scale, making it difficult to discover these relationships accurately without significant manual work, especially for datasets with over one million rows.

Innovation Solution

A system that determines key relationships by sampling data from database tables, using a sampling range based on distinct values within matching columns, and applying Structured Query Language (SQL) queries to the sampled data set to preserve relationships and improve performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If SQL queries are executed repeatedly on entire database tables to determine composite key relationships, then measurement precision is improved, but loss of time increases and productivity decreases

Engineering Contradiction:
Improveaccuracy of key relationship determinationVSAvoidtime consumption for query execution
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the entire database table into multiple sampled data sets by dividing rows into batches. Instead of querying the full table, SQL queries are executed on these smaller segments. The sampled data sets are processed in parallel or sequentially to determine composite key relationships, significantly reducing query execution time while maintaining acceptable accuracy through statistical sampling methods.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies partial action by querying only a sampled portion of the database table rather than the complete data set. By selecting representative samples (e.g., 1000-10000 rows) from the full table, the system obtains sufficient information to determine key relationships without the overhead of processing all rows, thus reducing time consumption while preserving measurement precision.

Inventive Principle:
Principle #16Partial or excessive action

2Measurement precision

If SQL queries are executed on larger database tables to discover composite key relationships, then measurement precision is improved, but productivity decreases

Engineering Contradiction:
Improveaccuracy of key relationship discoveryVSAvoidscaling capability with dataset size
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent divides large database tables into manageable sampled data sets that can be processed efficiently. By segmenting the data and applying parallel processing techniques, the system maintains productivity even as dataset size increases. The segmented approach allows multiple processors to work simultaneously on different portions of the data, preventing productivity degradation with larger tables.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the parameter of data volume from complete table size to sampled subset size. By adjusting sampling parameters (such as sample size, batch size, and confidence thresholds), the system optimizes the balance between measurement precision and productivity. This parameter change enables the system to scale to larger datasets without linearly increasing processing time, thus maintaining productivity.

Inventive Principle:
Principle #35Parameter changes

3Measurement precision

If manual creation of sample sets is performed for larger database tables, then measurement precision is improved, but device complexity increases

Engineering Contradiction:
Improveaccuracy of relationship determinationVSAvoidmanual work requirement
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent implements self-service by automatically generating sampled data sets from the database table without requiring manual intervention. The system automatically selects rows, creates batches, and prepares sample data for querying. This automation eliminates the need for users to manually create sample sets, reducing device complexity and operational overhead while maintaining the ability to achieve high measurement precision through systematic sampling.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9336246B2Generating composite key relationships between database objects based on sampling
Publication Date: 2016.05.10 DAEDALUS BLUE LLC
  • US9336246B2 patent drawing
  • US9336246B2 patent drawing
  • US9336246B2 patent drawing

AI summary

According to one embodiment of the present invention, a system determines key relationships between database tables and includes a computer system including at least one processor. The system determines a sampling range for one or more matching columns between first and second database tables. The matching columns satisfy one or more matching criteria and the sampling range is based on quantities of distinct values within the matching columns. Data is sampled from the first and second database tables in accordance with the sampling ranges to determine a sample set. Keys between the first and second database tables are determined based on matching between columns within the sample set. Embodiments of the present invention further include a method and computer program product for determining key relationships between database tables in substantially the same manner described above.