Clause-Wise Text-to-SQL for Unseen Database Schemas

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing natural language processing systems for generating SQL queries are typically database-specific and fail to generalize to different database schemas, limiting their effectiveness across multiple databases.

Innovation Solution

A general text-to-SQL system utilizing a deep learning architecture with multiple predictive modules, including a long short-term memory (LSTM) neural network and encoder-decoder networks, to predict and fill in the structure and content of SQL operations, enabling generation of complex queries across various database schemas.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional machine learning systems are trained on database-specific schemas, then they achieve high precision on that specific database, but they fail to generalize to different database schemas

Engineering Contradiction:
Improvequery generation precisionVSAvoiddatabase schema adaptability
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The system segments the query generation process into multiple independent modules: a schema-agnostic module that handles natural language understanding and query structure generation, and a schema-specific module that maps generic query structures to database-specific schemas. This segmentation allows the system to maintain high precision through specialized modules while achieving versatility through the modular architecture that can be configured for different schemas.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements a universal query generation framework that can function across multiple database schemas. The system uses a schema-agnostic natural language processing component that generates queries in a standardized format, which can then be adapted to various database schemas through configurable mapping layers, enabling one system to serve multiple databases with different schemas.

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

2Reliability

If rule-based natural language processing systems are used, then they provide deterministic parsing, but they achieve low precision and are only effective in specific use cases

Engineering Contradiction:
Improveparsing reliabilityVSAvoidlanguage understanding precision
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The system replaces traditional mechanical rule-based parsing with a neural network-based probabilistic model. The neural network learns patterns from training data and provides more accurate language understanding while maintaining reliability through the structured output format that guides query generation. This substitution enables the system to handle the complexity and variability of natural language more effectively.

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

Data Source

PatentUS12541509B2Clause-wise text-to-SQL generation
Publication Date: 2026.02.03 SAP SE
  • US12541509B2 patent drawing
  • US12541509B2 patent drawing
  • US12541509B2 patent drawing

AI summary

Provided is a system and method for generating an SQL operation from a natural language input using neural networks which works on data from a database that has not been seen before by the neural networks. In one example, the method may include receiving a natural language input, determining, via a first predictive module, a data structure of a SQL operation based on text included in the natural language input, filling in, via a second predictive module, one or more empty slots of the data structure of the SQL operation with text based on column names of a database and the text included in the natural language input, and storing the filled-in data structure of the SQL operation in a storage.