Compiler-Based SQL Translation for Graph Database Operations

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Graph databases do not support Structured Query Language (SQL) syntax, limiting the ability to process data operations efficiently.

Innovation Solution

A data processing method that uses a predetermined compiler to parse data operation statements, translates unsupported SQL syntax into supported Neo4j syntax, and performs operations based on a field translation relation, generating a syntax parsing tree to execute the operations in a graph database.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If SQL syntax is used for data operations, then ease of operation is improved, but compatibility with graph database is worsened

Engineering Contradiction:
Improveease of operationVSAvoidcompatibility
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent introduces a translator as an intermediary component between SQL syntax and graph database query syntax. The translator receives SQL statements, parses them, and converts them into equivalent graph database queries (such as Cypher), enabling users to operate with familiar SQL syntax while maintaining compatibility with the graph database system.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system dynamically changes the syntax parameters based on the target database type. When a graph database is detected, the translator transforms SQL syntax parameters into graph database-specific syntax parameters, allowing the same operational interface to adapt to different database types without requiring users to learn multiple syntaxes.

Inventive Principle:
Principle #35Parameter changes

2Adaptability or versatility

If graph database syntax is used, then compatibility with graph database is improved, but ease of operation is worsened

Engineering Contradiction:
ImprovecompatibilityVSAvoidease of operation
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The translator serves as an intermediary that shields users from complex graph database syntax by accepting simple SQL statements and automatically performing the syntax transformation, thus maintaining ease of operation while ensuring compatibility with graph database requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If syntax translation is implemented, then adaptability is improved, but device complexity is worsened

Engineering Contradiction:
ImproveadaptabilityVSAvoiddevice complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The translation system is segmented into distinct functional modules: a parser module that analyzes SQL syntax, a transformation module that converts syntax elements, and a generator module that produces graph database queries. This segmentation allows each module to handle specific tasks independently, making the overall complex system more manageable and maintainable.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The translator is designed as a universal component that can handle multiple types of data operations (select, insert, update, delete) and transform various SQL statements into corresponding graph database queries, reducing the need for multiple specialized translation tools.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS12619404B2Data processing methods and apparatuses, devices, and storage mediums
Publication Date: 2026.05.05 ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
  • US12619404B2 patent drawing
  • US12619404B2 patent drawing
  • US12619404B2 patent drawing

AI summary

Implementations of this specification provide data processing methods, apparatuses, and systems. In one implementation, a method includes: obtaining a statement for a data operation, wherein the statement comprises a command field, parsing the statement by a compiler, wherein the compiler is configured to support at least one syntax and provide a field translation relation among different syntaxes, in response to determining that the command field is absent from the at least one syntax supported by the complier, determining a target field in the at least one syntax that corresponds to the command field, and performing the data operation based on the target field.