Graph Database Insert Syntax for Primary Key Conflict Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for inserting data into a graph database do not support node or edge insertion, or cannot support primary key creation for inserted data and data update upon a primary key conflict.

Innovation Solution

A method and apparatus for inserting data into a graph database that supports the insertion of different types of graphic elements, including nodes and edges, and creates a primary key value for the inserted data, using an insert statement with element definition lists to describe element identifiers and object types, and executes the statement to form data rows based on these identifiers and types, with conflict detection and update capabilities.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If existing methods are used for inserting data into a graph database, then the insertion process is simple, but node or edge insertion is not supported and primary key creation is not supported

Engineering Contradiction:
Improvesupport for node and edge insertionVSAvoidinsertion method complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The insert statement is designed to support multiple types of graphic elements (nodes and edges) through a unified syntax structure. The element definition list can accommodate different element types using type identifiers, allowing the same insertion mechanism to handle diverse graph structures without requiring separate insertion methods for each element type.

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

2Reliability

If existing methods are used for inserting data into a graph database, then the insertion process is fast, but primary key creation and conflict detection are not supported

Engineering Contradiction:
Improvedata insertion correctnessVSAvoiddata insertion efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary actions by generating primary key values for inserted elements before the actual insertion occurs. The element definition list includes type identifiers that are used to create primary keys in advance, allowing the system to detect conflicts before data insertion and ensure correctness without significantly impacting insertion efficiency.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If primary key creation is implemented for inserted data, then data correctness is ensured, but the insertion process becomes more complex

Engineering Contradiction:
Improveprimary key creation accuracyVSAvoidinsertion statement complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The element definition list uses localized type identifiers specific to each element being inserted. Each element in the definition list carries its own type information, allowing the system to generate appropriate primary keys tailored to each element's specific requirements without imposing a complex unified structure on the entire insertion process.

Inventive Principle:
Principle #3Local quality

4Productivity

If multiple graphic elements are inserted simultaneously, then insertion efficiency is improved, but the risk of primary key conflicts increases

Engineering Contradiction:
Improvebatch insertion efficiencyVSAvoidconflict detection accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements feedback mechanisms by checking for primary key conflicts among simultaneously inserted elements. The element definition lists are processed to generate primary keys, and the system provides feedback by detecting conflicts between these generated keys, allowing corrective actions to be taken while maintaining batch insertion efficiency.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS12524467B2Methods and apparatuses for inserting data into graph database
Publication Date: 2026.01.13 ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
  • US12524467B2 patent drawing
  • US12524467B2 patent drawing
  • US12524467B2 patent drawing

AI summary

To insert data into a graph database, an insert statement for a target graph database is received, where the insert statement includes at least an insert keyword and several element definition lists corresponding to several graphic elements including nodes and/or edges. The several element definition lists describe respective element identifiers of the several graphic elements and object types of objects represented by the several graphic elements, and each element definition list includes each attribute value of each pre-described attribute of a corresponding graphic element. The insert statement is executed, including forming each data row corresponding to each graphic element based on each attribute value in each element definition list and determining a primary key value of a corresponding data row based on an element identifier and an object type of each graphic element. Each data row is inserted into the target graph database based on the primary key value.