Primary Key Determination Using Column Structural Relationships

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for determining a primary key in a database table are inefficient, especially when the table data changes, as they often require exhaustive searches of all possible column combinations, leading to exponential time and memory complexity, making them unsuitable for large or dynamically changing datasets.

Innovation Solution

The use of dataset statistics, such as column cardinality and structural relationships, to incrementally and efficiently determine a primary key, reducing complexity from exponential to polynomial time and memory usage, allowing for scalable primary key identification regardless of the table size.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the primary key is defined as the combination of all columns in the table, then the primary key remains valid even when table data changes, but resource consumption for calculations/transactions using the primary key increases exponentially

Engineering Contradiction:
Improveprimary key validityVSAvoidresource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts and removes unnecessary columns from the primary key combination, keeping only the essential columns that are required to uniquely identify each record. This reduces the primary key from potentially all columns to a minimal subset, thereby reducing resource consumption while maintaining validity.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments the table columns into different groups based on their necessity for primary key identification. By analyzing column dependencies and relationships, it identifies which column segments are essential and which can be excluded, creating an optimized primary key structure.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If all possible single- and multi-column keys are generated to determine the primary key, then the correct primary key can be identified, but time and memory complexity become unacceptable for most database tables

Engineering Contradiction:
Improveprimary key identification accuracyVSAvoiddetermination time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary analysis of column statistics, relationships, and dependencies before attempting to identify the primary key. By pre-processing the data to understand column characteristics and relationships, it avoids the need to exhaustively test all possible column combinations, significantly reducing determination time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of performing exhaustive analysis of all possible column combinations, the patent applies partial analysis by focusing on the most promising column subsets based on statistical indicators and relationship patterns. This partial approach achieves sufficient accuracy without the full computational cost of exhaustive search.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If manual execution of count queries is used to determine the primary key, then the primary key can be identified based on domain knowledge and experience, but the process is time-consuming and not scalable

Engineering Contradiction:
Improveprimary key identification accuracyVSAvoiddetermination efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent enables the system to automatically determine the primary key by analyzing column statistics and relationships without requiring manual intervention. The system self-services by gathering necessary information from metadata and data samples, applying analysis algorithms, and producing the primary key identification result autonomously.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent uses feedback from column statistics, data distribution patterns, and relationship analysis to iteratively refine the primary key candidate identification. By continuously gathering feedback from the data characteristics and adjusting the analysis accordingly, the system efficiently converges on the correct primary key without manual trial and error.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10942908B2Primary key determination
Publication Date: 2021.03.09 SAP IRELAND LTD
  • US10942908B2 patent drawing
  • US10942908B2 patent drawing
  • US10942908B2 patent drawing

AI summary

A database system includes a first table comprising a plurality of columns and a plurality of column values associated with each of the plurality of columns. For each of the plurality of columns, a structural relationship is determined with each other of the plurality of columns based on the plurality of column values associated with each of the plurality of columns. One or more of the plurality of columns comprising a primary key of the first table are determined based on the structural relationships.