Automated SQL Data Transfer via Metadata Retrieval
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing approaches for copying data from one relational database table to another are cumbersome and prone to errors, especially when dealing with large tables and sensitive data transfers.
Innovation Solution
A flexible mechanism using a Structured Query Language (SQL) table COPY statement that identifies a source and target table, retrieves column names, and generates an INSERT INTO and SELECT statement for data transfer, allowing for implicit and explicit data manipulations, error handling, and selection of specific rows.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If traditional manual methods are used to copy data between tables, then data transfer can be performed, but the process is cumbersome and prone to errors
Solution Approach 1:
The system automatically generates the complete SQL INSERT INTO...SELECT statement by retrieving column names from metadata and constructing the query without manual intervention. The database management system handles the entire data transfer process autonomously, eliminating manual copying operations and reducing errors.
Solution Approach 2:
The patent replaces manual mechanical data copying operations with an automated software-based approach. The database management system uses metadata retrieval and SQL statement generation mechanisms to substitute manual data entry and copying, thereby improving both ease of operation and reliability.
2Quantity of substance
If data from tables with many columns is copied, then substantial data can be transferred, but the complexity of the copy operation increases
Solution Approach 1:
The system segments the data transfer operation into distinct automated steps: retrieving column names from metadata, constructing the SQL statement with proper syntax, and executing the transfer. This segmentation of the complex task into manageable automated steps reduces the perceived complexity while enabling handling of tables with many columns.
Solution Approach 2:
The database management system acts as an intermediary that handles the complexity of managing numerous columns. By using metadata as an intermediary data structure and automated SQL generation as a mediator mechanism, the system abstracts away the complexity of working with tables having many columns, allowing straightforward data transfer.
3Adaptability or versatility
If column data types are changed during migration, then data can be adapted to new requirements, but the risk of data loss or corruption increases
Solution Approach 1:
The system incorporates feedback mechanisms where the database management system validates the generated SQL statement against the source and target table schemas before execution. This feedback loop allows the system to detect potential data type incompatibilities and handle them appropriately, maintaining data integrity while enabling necessary adaptations.
Solution Approach 2:
The system performs beforehand cushioning by validating data type compatibility and preparing the SQL statement in advance before actual data transfer. The database management system checks for potential issues with column data type changes and handles them proactively, preventing data loss or corruption before it occurs.
Data Source
AI summary
An approach is provided to copy records between tables in a relational database. In the approach, a Structured Query Language (SQL) table COPY statement is received with the COPY statement identifying a source table and a target table. Table column names are retrieved from a metadata that corresponds to the source table. The retrieved table column names are used to generate an SQL statement that includes an INSERT INTO clause pertaining to the target table and a SELECT clause pertaining to the source table, wherein the INSERT INTO clause includes a set of target column names and wherein the SELECT clause includes a set of corresponding source column names.


