Globally Unique Index Conflict Detection in Distributed Databases

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Distributed databases face challenges in ensuring the uniqueness of indices across multiple nodes, leading to potential data conflicts and reduced availability, as existing methods rely on service levels that increase complexity and may not guarantee data correctness.

Innovation Solution

A method and apparatus that utilize a conflict detection SQL statement to determine if a globally unique index is valid across all database nodes, processing the original SQL request only if the conflict detection result is within an expected value, and rolling back data if conflicts are detected.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If service level approaches are used to guarantee uniqueness of unique index in distributed database, then data correctness may be maintained, but system complexity increases and availability is reduced

Engineering Contradiction:
Improvedata correctnessVSAvoidservice complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent performs conflict detection before executing the original SQL statement by issuing a conflict detection SQL statement to check for potential unique index conflicts. This preliminary action identifies conflicts in advance, allowing the system to avoid executing statements that would cause data correctness issues, thereby maintaining reliability without requiring complex service-level conflict resolution mechanisms.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the conflict detection function from the original SQL execution process by creating a separate conflict detection SQL statement. This separation allows the system to check for conflicts independently before executing the main operation, reducing the complexity of service-level conflict management while maintaining data correctness through automated detection.

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If service level approaches are used to guarantee uniqueness of unique index in distributed database, then data correctness may be maintained, but system availability is reduced

Engineering Contradiction:
Improvedata correctnessVSAvoidsystem availability
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

By performing conflict detection before SQL execution, the system can quickly identify and reject conflicting operations without entering complex service-level conflict resolution processes. This preliminary check improves system availability by enabling faster decision-making on whether to proceed with SQL execution, reducing the time operations are blocked while maintaining data correctness.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system performs self-service conflict detection by automatically issuing conflict detection SQL statements and evaluating results without requiring external service-level intervention. This automation maintains data correctness through consistent conflict detection while improving availability by eliminating the need for complex service-level conflict resolution processes.

Inventive Principle:
Principle #25Self-service

3Reliability

If conflict detection SQL statement is issued to each database node, then globally unique index correctness is ensured, but processing time increases

Engineering Contradiction:
Improveunique index correctnessVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the conflict detection process by issuing separate conflict detection SQL statements to each database node independently. This segmentation allows parallel execution of conflict checks across distributed nodes, ensuring globally unique index correctness through comprehensive node-by-node verification while minimizing overall processing time through concurrent operation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent replaces complex mechanical conflict resolution mechanisms with automated SQL-based conflict detection. By substituting service-level conflict management with structured SQL queries that automatically detect conflicts, the system ensures unique index correctness across distributed nodes while reducing processing overhead compared to traditional conflict resolution approaches.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS11880367B2Method and apparatus for realizing globally unique index
Publication Date: 2024.01.23 XIAN ZHONGXING NEW SOFTWARE
  • US11880367B2 patent drawing
  • US11880367B2 patent drawing
  • US11880367B2 patent drawing

AI summary

Disclosed in embodiments of the present disclosure are methods and apparatuses for realizing a globally unique index, which are applicable to a distributed database. One of the methods includes: receiving a structured query language, SQL, request, obtaining a conflict detection SQL statement corresponding to the SQL request and calculating an expected value; issuing the conflict detection SQL statement to each database node for execution; obtaining an execution result of the conflict detection SQL statement, and comparing the execution result of the conflict detection SQL statement with the expected value; and when the execution result of the conflict detection SQL statement is less than or equal to the expected value, processing an original SQL statement of the SQL request, and issuing the original SQL statement to the each database node for execution.