CN112162994A - SQL (structured query language) generation method and system for system entry data - Google Patents
SQL (structured query language) generation method and system for system entry data Download PDFInfo
- Publication number
- CN112162994A CN112162994A CN202010933248.9A CN202010933248A CN112162994A CN 112162994 A CN112162994 A CN 112162994A CN 202010933248 A CN202010933248 A CN 202010933248A CN 112162994 A CN112162994 A CN 112162994A
- Authority
- CN
- China
- Prior art keywords
- data
- sql
- importing
- template
- generating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2433—Query languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a SQL generating method for system entry data, which comprises the following steps: setting the data format and requirements of the template file; collecting data of a first system, and importing the data of the first system into the template file according to the data format and requirements; importing the template file to an importing tool and generating an SQL script; and executing the SQL script at the second system. The method aims at efficiently and accurately inputting the data of the old system into the new system when the new and old information systems are switched. According to the method and the device, the SQL script of the new database can be generated more efficiently and accurately by using the data which is consumed by operation and maintenance personnel to be arranged and combining the template format and the relationship, and the problem that the operation and maintenance personnel subsequently enter the new database system after the data is arranged is solved.
Description
Technical Field
The application relates to the field of databases, in particular to a SQL (structured query language) generation method for system entry data.
Background
Any information system has a life cycle, when the existing system needs to be replaced due to the end of the life cycle or other reasons, the method can ensure smooth data during the switching of the new system and the old system, reduce the pressure and burden of related personnel such as development, operation and maintenance and the like, and efficiently finish the switching work.
With the factors of technical progress, service promotion and development, information system carrier replacement, etc., information systems reaching a certain life cycle are gradually replaced by new systems. However, in the new and old switching, the data of the old system is still useful data, and the old system needs to continue to operate in the new system, so that the problem that the data of the old system is recorded into the new system must be faced.
For an information system, data is the most important of the core and the repetition, and old data can be reserved to the maximum extent during switching. The conventional method still needs the universal cooperation of development and operation and maintenance personnel, and the butt joint of new and old data is realized by combing the data in advance and using SQL in a storage process mode. However, more workload and manpower are occupied for one item of data combing, and higher requirements are also imposed on the entering personnel for entering the combed data into a new database table. The conventional transfer mode causes large workload of personnel of each party and long construction period.
Disclosure of Invention
The main objective of the present application is to provide a method for generating SQL for system entry data, which includes:
setting the data format and requirements of the template file;
collecting data of a first system, and importing the data of the first system into the template file according to the data format and requirements;
importing the template file to an importing tool and generating an SQL script;
and executing the SQL script at the second system.
Optionally, in the SQL generating method for system entry data, importing the template file to an import tool, and generating an SQL script includes:
importing template data;
verifying the template data and obtaining a verification result;
filling public information according to the verification result;
adapting the first system and the second system and obtaining an adaptation result;
and generating SQL according to the adaptation result.
Optionally, in the SQL generation method for system entry data, filling in public information according to the verification result includes:
when the verification result is passed, filling public information;
and when the verification result is that the template data does not pass, the template data is imported again.
Optionally, in the SQL generation method for system entry data, when the verification result is failed, the template data is modified, and the template data is reintroduced.
Optionally, in the SQL generation method for system entry data, generating SQL according to the adaptation result includes:
when the adaptation result is unsuccessful, generating SQL;
and when the adaptation result is successful, importing new data to generate the SQL.
Optionally, in the SQL generation method for system entry data, when the adaptation result is successful, new data is imported, and an adaptation type is selected to generate SQL.
According to another aspect of the present application, there is also provided an SQL generation system for system entry data, comprising:
the setting module is used for setting the data format and the requirements of the template file;
the collection module is used for collecting data of a first system and importing the data of the first system to the template file according to the data format and the requirement;
the import module is used for importing template data;
the checking module is used for checking the template data and obtaining a checking result;
the filling module is used for filling public information according to the verification result;
the adaptation module is used for adapting the first system and the second system and obtaining an adaptation result;
the generating module is used for generating SQL according to the adaptation result;
and the execution module is used for executing the SQL script on the second system.
The application also discloses a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of being executed by the processor, wherein the processor realizes the method of any one of the above items when executing the computer program.
The application also discloses a computer-readable storage medium, a non-volatile readable storage medium, having stored therein a computer program which, when executed by a processor, implements the method of any of the above.
The present application also discloses a computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method of any of the above.
Compared with the prior art, the method has the following beneficial effects:
the method aims at efficiently and accurately inputting the data of the old system into the new system when the new and old information systems are switched. According to the method and the device, the SQL script of the new database can be generated more efficiently and accurately by using the data which is consumed by operation and maintenance personnel to be arranged and combining the template format and the relationship, and the problem that the operation and maintenance personnel subsequently enter the new database system after the data is arranged is solved. And along with the improvement of the use proficiency, the efficiency of switching to the same system for different customers can be greatly improved, and the pressure of each party is reduced. In addition, the method can quickly enable a user to find the data problem in switching, is convenient for the optimization design of a new system database, and improves the experience of the whole information system.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a schematic flow diagram of a method for SQL generation of system entry data according to one embodiment of the present application;
FIG. 2 is a flow diagram of a method for SQL generation of system entry data according to one embodiment of the present application;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the present application; and
FIG. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Referring to fig. 1-2, an embodiment of the present application provides 1. a method for generating SQL for system entry data, including:
s2: setting the data format and requirements of the template file;
s4: collecting data of a first system, and importing the data of the first system into the template file according to the data format and requirements;
s6: importing the template file to an importing tool and generating an SQL script;
s8: and executing the SQL script at the second system.
The method depends on the data and logic relation of the template file, and the specific execution method and steps are as follows:
1) training of template data filling personnel on format and filling requirements of template data
2) Collecting data and importing the data into template file
3) The template file data is imported into the tool, and the tool flow is shown in FIG. 2.
4) SQL script generated by new data execution
In an embodiment of the present application, importing the template file to an import tool, and generating an SQL script includes:
importing template data;
verifying the template data and obtaining a verification result;
filling public information according to the verification result;
adapting the first system and the second system and obtaining an adaptation result;
and generating SQL according to the adaptation result.
In an embodiment of the present application, filling in public information according to the verification result includes:
when the verification result is passed, filling public information;
and when the verification result is that the template data does not pass, the template data is imported again.
In an embodiment of the present application, when the verification result is failed, the template data is modified, and the template data is re-imported.
In an embodiment of the present application, generating SQL according to the adaptation result includes:
when the adaptation result is unsuccessful, generating SQL;
and when the adaptation result is successful, importing new data to generate the SQL.
In an embodiment of the application, when the adaptation result is successful, new data is imported, an adaptation type is selected, and the SQL is generated.
An embodiment of the present application further provides an SQL generating system for system entry data, including:
the setting module is used for setting the data format and the requirements of the template file;
the collection module is used for collecting data of a first system and importing the data of the first system to the template file according to the data format and the requirement;
the import module is used for importing template data;
the checking module is used for checking the template data and obtaining a checking result;
the filling module is used for filling public information according to the verification result;
the adaptation module is used for adapting the first system and the second system and obtaining an adaptation result;
the generating module is used for generating SQL according to the adaptation result;
and the execution module is used for executing the SQL script on the second system.
Compared with the prior art, the method has the following beneficial effects:
the method aims at efficiently and accurately inputting the data of the old system into the new system when the new and old information systems are switched. According to the method and the device, the SQL script of the new database can be generated more efficiently and accurately by using the data which is consumed by operation and maintenance personnel to be arranged and combining the template format and the relationship, and the problem that the operation and maintenance personnel subsequently enter the new database system after the data is arranged is solved. And along with the improvement of the use proficiency, the efficiency of switching to the same system for different customers can be greatly improved, and the pressure of each party is reduced. In addition, the method can quickly enable a user to find the data problem in switching, is convenient for the optimization design of a new system database, and improves the experience of the whole information system.
Referring to fig. 3, the present application further provides a computer device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method of any one of the above methods when executing the computer program.
Referring to fig. 4, a computer-readable storage medium, a non-volatile readable storage medium, having stored therein a computer program which, when executed by a processor, implements any of the methods described above.
A computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method of any of the above.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A SQL generating method for system entry data is characterized by comprising the following steps:
setting the data format and requirements of the template file;
collecting data of a first system, and importing the data of the first system into the template file according to the data format and requirements;
importing the template file to an importing tool and generating an SQL script;
and executing the SQL script at the second system.
2. The SQL generation method for system entry data according to claim 1, wherein importing the template file into an import tool and generating an SQL script comprises:
importing template data;
verifying the template data and obtaining a verification result;
filling public information according to the verification result;
adapting the first system and the second system and obtaining an adaptation result;
and generating SQL according to the adaptation result.
3. The SQL generation method for system entry data according to claim 2, wherein the filling in public information according to the verification result comprises:
when the verification result is passed, filling public information;
and when the verification result is that the template data does not pass, the template data is imported again.
4. The SQL generation method for system entry data according to claim 3, wherein when the verification result is a pass, the template data is modified and re-imported.
5. The SQL generating method for system entry data according to claim 4, wherein generating SQL according to the adaptation result comprises:
when the adaptation result is unsuccessful, generating SQL;
and when the adaptation result is successful, importing new data to generate the SQL.
6. The SQL generating method for system entry data according to claim 5, wherein when the adaptation result is successful, new data is imported, and an adaptation type is selected to generate SQL.
7. A system for SQL generation for system entry data, comprising:
the setting module is used for setting the data format and the requirements of the template file;
the collection module is used for collecting data of a first system and importing the data of the first system to the template file according to the data format and the requirement;
the import module is used for importing template data;
the checking module is used for checking the template data and obtaining a checking result;
the filling module is used for filling public information according to the verification result;
the adaptation module is used for adapting the first system and the second system and obtaining an adaptation result;
the generating module is used for generating SQL according to the adaptation result;
and the execution module is used for executing the SQL script on the second system.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor implements the method of any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium, a non-transitory readable storage medium, having stored therein a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of claims 1-6.
10. A computer program product comprising computer readable code that, when executed by a computer device, causes the computer device to perform the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010933248.9A CN112162994A (en) | 2020-09-08 | 2020-09-08 | SQL (structured query language) generation method and system for system entry data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010933248.9A CN112162994A (en) | 2020-09-08 | 2020-09-08 | SQL (structured query language) generation method and system for system entry data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112162994A true CN112162994A (en) | 2021-01-01 |
Family
ID=73859153
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010933248.9A Pending CN112162994A (en) | 2020-09-08 | 2020-09-08 | SQL (structured query language) generation method and system for system entry data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112162994A (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101364891A (en) * | 2007-08-10 | 2009-02-11 | 中兴通讯股份有限公司 | System for collecting performance data by single point in distributed telecommunication network management and implementing method |
CN103595727A (en) * | 2013-11-22 | 2014-02-19 | 中国航天科工集团第二研究院七〇六所 | Cross-domain incremental data exchange model and method based on exchange identification |
CN103744982A (en) * | 2014-01-15 | 2014-04-23 | 北京神州普惠科技股份有限公司 | Method for importing Excel data into database |
CN104361221A (en) * | 2014-10-31 | 2015-02-18 | 沈阳锐易特软件技术有限公司 | Heterogeneous system data mapping template-based medical data acquisition system and method |
CN106776962A (en) * | 2016-12-05 | 2017-05-31 | 济南浪潮高新科技投资发展有限公司 | A kind of general Excel data import multiple database physical table methods |
CN108595597A (en) * | 2018-04-19 | 2018-09-28 | 平安科技(深圳)有限公司 | Data lead-in method, device, computer equipment and storage medium |
CN109284293A (en) * | 2018-10-08 | 2019-01-29 | 湖南工学院 | Data migration method for water utilities company operating charges system upgrade |
CN109976736A (en) * | 2019-03-21 | 2019-07-05 | 安徽典典科技发展有限责任公司 | Reduce the unified platform application framework of system business model complexity |
CN110781235A (en) * | 2019-10-24 | 2020-02-11 | 珠海格力电器股份有限公司 | Big data based purchase data processing method and device, terminal and storage medium |
CN110941630A (en) * | 2019-10-25 | 2020-03-31 | 泰康保险集团股份有限公司 | Database operation and maintenance method, device and system |
CN111324647A (en) * | 2020-01-21 | 2020-06-23 | 北京东方金信科技有限公司 | Method and device for generating ETL code |
-
2020
- 2020-09-08 CN CN202010933248.9A patent/CN112162994A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101364891A (en) * | 2007-08-10 | 2009-02-11 | 中兴通讯股份有限公司 | System for collecting performance data by single point in distributed telecommunication network management and implementing method |
CN103595727A (en) * | 2013-11-22 | 2014-02-19 | 中国航天科工集团第二研究院七〇六所 | Cross-domain incremental data exchange model and method based on exchange identification |
CN103744982A (en) * | 2014-01-15 | 2014-04-23 | 北京神州普惠科技股份有限公司 | Method for importing Excel data into database |
CN104361221A (en) * | 2014-10-31 | 2015-02-18 | 沈阳锐易特软件技术有限公司 | Heterogeneous system data mapping template-based medical data acquisition system and method |
CN106776962A (en) * | 2016-12-05 | 2017-05-31 | 济南浪潮高新科技投资发展有限公司 | A kind of general Excel data import multiple database physical table methods |
CN108595597A (en) * | 2018-04-19 | 2018-09-28 | 平安科技(深圳)有限公司 | Data lead-in method, device, computer equipment and storage medium |
CN109284293A (en) * | 2018-10-08 | 2019-01-29 | 湖南工学院 | Data migration method for water utilities company operating charges system upgrade |
CN109976736A (en) * | 2019-03-21 | 2019-07-05 | 安徽典典科技发展有限责任公司 | Reduce the unified platform application framework of system business model complexity |
CN110781235A (en) * | 2019-10-24 | 2020-02-11 | 珠海格力电器股份有限公司 | Big data based purchase data processing method and device, terminal and storage medium |
CN110941630A (en) * | 2019-10-25 | 2020-03-31 | 泰康保险集团股份有限公司 | Database operation and maintenance method, device and system |
CN111324647A (en) * | 2020-01-21 | 2020-06-23 | 北京东方金信科技有限公司 | Method and device for generating ETL code |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106469064A (en) | Code generating method and code generating unit | |
CN109614102A (en) | Code automatic generation method, device, electronic equipment and storage medium | |
CN112270550B (en) | New energy power tracing method and system based on blockchain | |
CN103309904A (en) | Method and device for generating data warehouse ETL (Extraction, Transformation and Loading) codes | |
CN105550268A (en) | Big data process modeling analysis engine | |
CN106649239A (en) | Method and device for generating report in cloud monitoring system based on visualization | |
CN111125178B (en) | Data query method, device, terminal, presto query engine and storage medium | |
CN108804322A (en) | Automated testing method, device, computer equipment and storage medium | |
CN111428458A (en) | Universal report generation method and device and computer readable storage medium | |
CN105426419B (en) | Data promotion system and method between heterogeneous system | |
CN111797604A (en) | Report generation method, device, equipment and computer readable storage medium | |
CN110471754A (en) | Method for exhibiting data, device, equipment and storage medium in job scheduling | |
CN109241037A (en) | A kind of method, apparatus that realizing database processing, equipment and storage medium | |
CN106250429A (en) | Data extraction method based on sqoop | |
CN111190814A (en) | Software test case generation method and device, storage medium and terminal | |
CN114491492A (en) | Enterprise-level information system permission reconstruction method and system | |
CN110442647A (en) | Data consistency synchronous method, device and computer readable storage medium | |
KR102243794B1 (en) | Data integration device and data integration method | |
CN111061578B (en) | Automatic network activation system based on double-track guarantee production mechanism | |
CN112162994A (en) | SQL (structured query language) generation method and system for system entry data | |
CN109471709B (en) | Scheduling method for flow task processing big data based on Apache Oozie framework | |
CN112130849B (en) | Code automatic generation method and device | |
CN113867714B (en) | Automatic code generation method adapting to multiple languages | |
CN115982278A (en) | Self-service real-time data comparison method and system based on MPP database | |
Satyarthi et al. | Framework for Requirement Management using Requirement Traceability. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |