Stored Procedure Migration via On-Demand Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Migrating data between different databases is often difficult and time-consuming due to differences in schema objects, syntax, and language structures, especially when legacy databases with extensive stored procedures need to be transitioned to new systems, requiring costly and error-prone rewrites.
Innovation Solution
The method involves extracting stored procedures from a source database and deploying them as functions in an on-demand code execution service, allowing direct invocation and conversion into intermediate representations or general-purpose programming languages, enabling seamless migration without extensive rewrites, and using a database proxy to route requests to the appropriate execution environment.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If stored procedures are rewritten to convert between different database syntax and language structures, then compatibility with the target database is improved, but the migration cost and time increase significantly
Solution Approach 1:
The patent introduces an intermediary system that translates stored procedure calls from the source database syntax to the target database syntax automatically. This intermediary layer handles the conversion of procedural logic, parameter mappings, and control structures without requiring manual rewriting, thereby maintaining database compatibility while significantly reducing migration time and effort.
Solution Approach 2:
The system automatically detects and transforms parameter definitions, data types, and procedural syntax from the source database to match the target database requirements. By dynamically adjusting these parameters through automated translation rules, the system achieves syntax compatibility without manual intervention, resolving the contradiction between adaptability and migration time.
2Adaptability or versatility
If extensive stored procedure rewrites are performed to migrate legacy databases, then functionality is preserved, but bugs are introduced and reliability decreases
Solution Approach 1:
The patent creates an automated copy mechanism that replicates the source database's stored procedures and translates them to the target database syntax. This copying approach preserves the original procedural logic and functionality while automatically adapting the syntax, thereby maintaining reliability without requiring manual rewriting that could introduce bugs.
Solution Approach 2:
The intermediary translation system acts as a bridge that faithfully reproduces the source stored procedure functionality in the target database syntax. By using automated translation rules and validation mechanisms, the system ensures that the translated procedures maintain the same logical behavior as the originals, preserving reliability during migration.
3Manufacturing precision
If manual conversion of schema objects and stored procedures is performed, then precision in migration is improved, but the complexity of the migration process increases
Solution Approach 1:
The patent implements a self-service migration system that automatically detects schema objects, analyzes their structures, and converts them to the target database format without manual intervention. The system self-configures translation rules, validates conversions, and handles edge cases automatically, thereby achieving high conversion accuracy while reducing process complexity by eliminating manual steps.
Solution Approach 2:
The system performs preliminary analysis of the source database schema and stored procedures before migration, automatically generating translation mappings and conversion rules. This preliminary action prepares the migration path in advance, ensuring accuracy while simplifying the actual migration execution by pre-computing all necessary transformations.
4Ease of manufacture
If stored procedures are extracted and deployed to on-demand execution environments, then migration cost is reduced, but the complexity of deployment architecture increases
Solution Approach 1:
The patent extracts stored procedures from the traditional database execution dimension and deploys them to an on-demand code execution dimension (such as serverless functions or containerized environments). This dimensional shift allows the use of cost-effective, scalable execution models while maintaining the procedural logic, thereby reducing migration costs despite the increased architectural complexity of managing multiple execution environments.
Data Source
AI summary
Techniques for streamlined database migration with stored procedure extraction into on-demand execution environments are described. A stored procedure of a first database is obtained and a code segment corresponding to the stored procedure is deployed as a function of an on-demand code execution service. A client application may directly execute the stored procedure by issuing a call to the on-demand code execution service to invoke the function, or by issuing a request to execute the stored procedure that is intercepted by a database proxy, which services the request by invoking the function on the client application's behalf.


