[go: up one dir, main page]

CN113672626B - Data structure changing method and device and electronic equipment - Google Patents

Data structure changing method and device and electronic equipment Download PDF

Info

Publication number
CN113672626B
CN113672626B CN202111039474.3A CN202111039474A CN113672626B CN 113672626 B CN113672626 B CN 113672626B CN 202111039474 A CN202111039474 A CN 202111039474A CN 113672626 B CN113672626 B CN 113672626B
Authority
CN
China
Prior art keywords
adjustment
information
data
sql
table structure
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.)
Active
Application number
CN202111039474.3A
Other languages
Chinese (zh)
Other versions
CN113672626A (en
Inventor
谢珊珊
黄枫
赖俊宏
白小洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202111039474.3A priority Critical patent/CN113672626B/en
Publication of CN113672626A publication Critical patent/CN113672626A/en
Application granted granted Critical
Publication of CN113672626B publication Critical patent/CN113672626B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data structure changing method, a data structure changing device and electronic equipment, which can be applied to the field of big data or the field of finance. In the method, product information corresponding to login user information, batch information corresponding to the product information and database identifiers corresponding to the batch information are inquired, target batch information selected by a user is obtained, table structure information corresponding to the target batch information is read and displayed, adjustment operation of the displayed table structure information by the user is received, SQL adjustment data corresponding to the adjustment operation are generated, the SQL adjustment data are operated to achieve adjustment of the table structure information corresponding to the target batch information, and synchronous adjustment operation is conducted on the table structure information corresponding to different batch information corresponding to the product information based on the SQL adjustment data. The invention realizes automatic change of the data structure, and avoids the problems of complex operation, lower efficiency and lower accuracy caused by manual change.

Description

Data structure changing method and device and electronic equipment
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and an apparatus for changing a data structure, and an electronic device.
Background
The data structure change refers to a change of the SQL DDL (data definition language) in program development.
In the case of changing a data structure, the data structure is generally changed by manually managing the data structure changing process. Such as manually managing the operation of SQL of a batch database and synchronizing operations between different batches. The whole data structure changing process is complex in operation, low in efficiency and low in accuracy.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus and an electronic device for changing a data structure, so as to solve the problems of complex operation, low efficiency and low accuracy in the whole data structure changing process.
In order to solve the technical problems, the invention adopts the following technical scheme:
a data structure altering method, comprising:
acquiring login user information, and inquiring product information corresponding to the login user information, batch information corresponding to the product information and a database identifier corresponding to the batch information;
acquiring target batch information selected by a user from the batch information corresponding to the product information, reading and displaying table structure information corresponding to the target batch information from a database corresponding to a database identifier corresponding to the target batch information;
receiving adjustment operation of a user on the displayed table structure information, and generating SQL adjustment data corresponding to the adjustment operation;
operating the SQL adjustment data to realize adjustment of table structure information corresponding to the target batch information;
and based on the SQL adjustment data, carrying out synchronous adjustment operation on the table structure information corresponding to the different batch information corresponding to the product information.
Optionally, receiving an adjustment operation of the user on the presented table structure information, and generating SQL adjustment data corresponding to the adjustment operation, including:
acquiring at least one adjustment sub-operation of the displayed table structure information, which is input by a user on a display interface; the adjustment sub-operation at least comprises adding, deleting or modifying;
determining SQL adjustment sub-data corresponding to each adjustment sub-operation;
and integrating all the SQL adjustment sub data to obtain SQL adjustment data.
Optionally, after generating the SQL adjustment data corresponding to the adjustment operation, the method further includes:
comparing the adjusted table structure information with the table structure information before adjustment to obtain a current adjustment record table;
comparing the adjusted table structure information with initial table structure information corresponding to the table structure information to obtain a complete adjustment record table; and the table identification information of the current adjustment record table and the complete adjustment record table are related to the adjustment times of the table structure information.
Optionally, the method further comprises:
receiving an adjustment inquiry operation; the adjustment query operation comprises target product information to be queried;
determining an adjustment record table corresponding to the target product information; the adjustment record table includes a complete adjustment record table and/or a current adjustment record table.
Optionally, the method further comprises:
outputting the latest complete adjustment record table under the condition of reaching the production time point;
and generating a complete data dictionary according to the complete adjustment record table and the initial table structure information.
Optionally, running the SQL adjustment data to implement adjustment of table structure information corresponding to the target lot information includes:
and calling a Jekins tool to enable the Jekins tool to operate the SQL adjustment data so as to adjust the table structure information corresponding to the target batch information.
Optionally, based on the SQL adjustment data, performing a synchronous adjustment operation on table structure information corresponding to different batch information corresponding to the product information, including:
calling a Jekins tool after the table structure information corresponding to the target batch information is successfully regulated, so that the Jekins tool stores the SQL regulation data into an SVN appointed directory and stores the SQL regulation data into an appointed position corresponding to a fly tool;
and calling the flyback tool to enable the flyback tool to synchronously adjust the table structure information corresponding to the product information and the other batch information except the target batch information by using the SQL adjustment data.
Optionally, in the case that the table structure information corresponding to the target lot information is not successfully adjusted, the method further includes:
and calling the Jekins tool to enable the Jekins tool to execute rollback operation until the table structure information corresponding to the target batch information is successfully adjusted.
A data structure changing apparatus comprising:
the data determining module is used for acquiring login user information and inquiring product information corresponding to the login user information, batch information corresponding to the product information and database identifiers corresponding to the batch information;
the information display module is used for acquiring target batch information selected by a user from the batch information corresponding to the product information, reading the table structure information corresponding to the target batch information from a database corresponding to the database identifier corresponding to the target batch information, and displaying the table structure information;
the adjustment data generation module is used for receiving adjustment operation of a user on the displayed table structure information and generating SQL adjustment data corresponding to the adjustment operation;
the adjustment data operation module is used for operating the SQL adjustment data so as to realize adjustment of the table structure information corresponding to the target batch information;
and the synchronous adjustment module is used for carrying out synchronous adjustment operation on the table structure information corresponding to the different batch information corresponding to the product information based on the SQL adjustment data.
An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor invokes the program and is configured to perform the data structure modification method described above.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a data structure changing method, a device and electronic equipment, wherein login user information is obtained, product information corresponding to the login user information, batch information corresponding to the product information and database identifications corresponding to the batch information are queried, target batch information selected by a user from the batch information corresponding to the product information is obtained, table structure information corresponding to the target batch information is read from a database corresponding to the database identifications corresponding to the target batch information, and displayed, adjustment operation of the displayed table structure information by the user is received, SQL adjustment data corresponding to the adjustment operation is generated, the SQL adjustment data is operated, so that adjustment of the table structure information corresponding to the target batch information is realized, and synchronous adjustment operation is carried out on the table structure information corresponding to different batch information corresponding to the product information based on the SQL adjustment data. The invention realizes automatic change of the data structure, and avoids the problems of complex operation, lower efficiency and lower accuracy caused by manual change.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for changing a data structure according to an embodiment of the present invention;
FIG. 2 is an internal architecture diagram of a data structure modification system according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another method for changing a data structure according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for changing a data structure according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data structure changing device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the case of changing a data structure, the data structure is generally changed by manually managing the data structure changing process. Such as manually managing the operation of SQL of a batch database and synchronizing operations between different batches. The whole data structure changing process is complex in operation, low in efficiency and low in accuracy.
In order to solve the above-mentioned problems, the inventors have found that if the data structure can be automatically changed, the problems of complicated operation, low efficiency and low accuracy due to manual change can be avoided.
The embodiment of the invention provides a data structure changing method, a device and electronic equipment, wherein login user information is obtained, product information corresponding to the login user information, batch information corresponding to the product information and database identifications corresponding to the batch information are queried, target batch information selected by a user from the batch information corresponding to the product information is obtained, table structure information corresponding to the target batch information is read from a database corresponding to the database identifications corresponding to the target batch information, and displayed, adjustment operation of the displayed table structure information by the user is received, SQL adjustment data corresponding to the adjustment operation is generated, the SQL adjustment data is operated, so that adjustment of the table structure information corresponding to the target batch information is realized, and synchronous adjustment operation is performed on the table structure information corresponding to different batch information corresponding to the product information based on the SQL adjustment data. The invention realizes automatic change of the data structure, and avoids the problems of complex operation, lower efficiency and lower accuracy caused by manual change.
It should be noted that the data structure changing method, the device and the electronic equipment provided by the invention can be used in the big data field or the financial field. The foregoing is merely an example, and the application fields of the data structure changing method, the device and the electronic equipment provided by the invention are not limited.
The execution main body of the data structure changing method provided by the embodiment of the invention can be a processor, and a data structure changing system is arranged in the processor, and can support the login of a user and realize the record of the data structure change.
Referring to fig. 2, the data structure change system may include:
the system comprises a product parameter management module, a table structure management module, a table change checking module, a data dictionary maintenance module, a export production SQL module and an execution result query module.
The product parameter management module can perform batch maintenance, product batch maintenance, database parameter maintenance, product information maintenance and the like.
In this embodiment, only authorized users, such as database administrator DBA roles, can call the product parameter management module to implement data maintenance. The data maintained mainly include: product personnel list, configuration and maintenance of product information, batch information configuration and maintenance, product batch associated information configuration and maintenance, database information configuration and maintenance.
The table structure management module can maintain corresponding table structures according to the selected products and batches, and record the baseline data and change records of each batch table structure of each product.
The table change checking module generates a data structure change SQL DDL final integrated record and all history modification records of the display table structure according to the record of the table structure management module.
The table change recording module can record the modification or adjustment records of the table, the table structure, the table main key and the table index, and inquire about the specific modification records according to the dimensions of the table, the table structure, the table main key and the table index.
The export production SQL module may generate production SQL from the base lines generated by the table structure maintenance.
The data dictionary maintenance module can generate the latest data dictionary according to the data dictionary of the previous batch and the modification record of the batch; when the batch is put into production or no data structure change exists, maintenance personnel can issue the data dictionary of the batch so as to realize the function of issuing the base line.
The execution result query module is an operation result when maintaining the table structure each time, and if the execution is unsuccessful, the executed operation rolls back.
In addition, when the table structure is modified, a plurality of data tables can be constructed, and each data table stores a corresponding modification record. The data tables may include a table structure baseline table, a table structure baseline modification record table, a table structure primary key baseline modification record table, a table structure index baseline modification record table, and the like.
Referring to fig. 1, the data structure changing method may include:
s11, acquiring login user information, and inquiring product information corresponding to the login user information, batch information corresponding to the product information and database identification corresponding to the batch information.
In practical applications, the data structure changing system in this embodiment may implement data structure change of a plurality of products, and the products in this embodiment may be a loan system, a transfer system, a money transfer system, and so on. Each product has multiple functions, which need to be developed simultaneously or sequentially, and further each product is provided with multiple batches, and each batch is developed on different functions aiming at the same product code.
For each batch, a corresponding database is set for data storage, the database may be Oracle, etc., the data structure changing process corresponding to the batch may also be recorded in the corresponding database, for example, the table structure baseline table, the table structure baseline modification record table, the table structure primary key baseline modification record table, the table structure index baseline table, and the table structure index baseline modification record table may be recorded in the database.
In this embodiment, if the user wants to change the data structure, the user may click on the data structure changing system, then click on the login operation, input login information, such as a user name and a password, and after the login information verifies and logs in, display product information corresponding to the user. Specifically, the data structure changing system may query the product personnel table to determine which product the login user corresponds to, and then query batch information corresponding to the product information and database identification corresponding to the batch information. In this embodiment, the lot information corresponding to the product information is all the lot information that appears corresponding to the product.
S12, acquiring target batch information selected by a user from the batch information corresponding to the product information, reading and displaying table structure information corresponding to the target batch information from a database corresponding to a database identifier corresponding to the target batch information.
In this embodiment, the batch information corresponding to the product may be displayed in the form of icons such as a list, so that a user may select one batch information to adjust the table structure information corresponding to the batch information.
In this embodiment, the batch information selected by the user is used as the target batch information, and then a database identifier corresponding to the target batch information is determined, where the database identifier may be a database name or the like, such as multiple data sources of Oracle or the like, and then a database corresponding to the database identifier is accessed. And reading the table structure information corresponding to the target batch information from the database, and displaying the table structure information in an editable form such as a text box or a drop-down menu.
S13, receiving adjustment operation of a user on the displayed table structure information, and generating SQL adjustment data corresponding to the adjustment operation.
In this embodiment, the user may modify the field value, length, type, etc. of each field in the table structure information by inputting the field value from a to B or modify the type of the field a. After the user completes the modification to the content to be modified, the save or confirm button may be clicked, and the background may generate SQL adjustment data, which may also be referred to as a change SQL, according to the user modification.
In practical application, referring to fig. 3, step S13 may include:
s21, acquiring at least one adjustment sub-operation of the displayed table structure information, which is input by a user on a display interface.
The adjustment sub-operation at least comprises adding, deleting or modifying.
In this embodiment, the user may modify the field value, length, type, etc. of at least one field. In addition, a field may be deleted or added, that is, in this embodiment, a modification, deletion, or addition operation may be performed on the field.
In addition, in this embodiment, when the user adjusts each field, the user is used as an adjustment sub-operation. When multiple fields are adjusted, there are multiple adjustment sub-operations.
S22, determining SQL adjustment sub-data corresponding to each adjustment sub-operation.
In this embodiment, the SQL adjustment sub-data may be dynamically generated in real time according to the adjustment sub-operation of the user. In this embodiment, what way to generate the SQL adjustment sub-data may be set by a technician.
S23, integrating all the SQL adjustment sub data to obtain SQL adjustment data.
In this embodiment, according to the adjustment sequence, all the SQL adjustment sub-data may be integrated to obtain SQL adjustment data. Or integrating all the SQL adjustment sub-data according to the column sequence positions to obtain SQL adjustment data.
After the SQL adjustment data are generated, the adjusted table structure information and the table structure information before adjustment can be compared to obtain a current adjustment record table, and the adjusted table structure information and the initial table structure information corresponding to the table structure information are compared to obtain a complete adjustment record table.
And the table identification information of the current adjustment record table and the complete adjustment record table are related to the adjustment times of the table structure information.
In this embodiment, for each adjustment operation of the user, the adjusted table structure information may be compared with the table structure information before adjustment to obtain the current adjustment record table. If the user has multiple adjustments, table identification information, such as current adjustment record table 01, current adjustment record table 02, and current adjustment record table 03 … …, can be set for the current adjustment record table according to the adjustment order
In addition, the adjusted table structure information and the initial table structure information corresponding to the table structure information may be compared to obtain a complete adjustment record table, that is, the adjusted table structure information is compared with the initial table structure information at the beginning, that is, the current version of the current table structure information is compared with the first version to obtain the complete adjustment record table. If the user has multiple adjustments in sequence, table identification information, such as a complete adjustment record table 01, a complete adjustment record table 02, and a complete adjustment record table 03 … …, can be set for the complete adjustment record table according to the adjustment sequence.
It should be noted that, the current adjustment record table records two adjacent adjustment records, as an intermediate adjustment process, the complete adjustment record table records the latest adjustment record of the table structure information and the table structure information of the first version, and as a complete adjustment process, when the production is required, for example, when the production time point is reached, the latest complete adjustment record table is directly output, so that the change of the final table structure information compared with the table structure information of the initial version can be directly observed.
In another implementation manner of the invention, the adjustment inquiry operation of the user can be supported, the operation is responded, and the adjustment record table required by the user is inquired.
Specifically, 1) an adjustment query operation is received.
The adjustment query operation includes target product information to be queried. The change records of each table can be checked from the table, the table structure, the table main key and the table index dimension, so that each development can conveniently and easily check each table change record according to an excel view.
In this embodiment, the user may be allowed to adjust the query operation according to the product, and when querying, the user may select the target product information to be queried in a manner of text box input or drop-down menu selection.
2) Determining an adjustment record table corresponding to the target product information; the adjustment record table includes a complete adjustment record table and/or a current adjustment record table.
In this embodiment, the complete adjustment record table and/or the current adjustment record table corresponding to the target product information may be determined according to the complete adjustment record table and/or the current adjustment record table.
In this embodiment, the complete adjustment record table and/or the current adjustment record table may be:
the above table structure baseline table, table structure baseline modification record table, table structure primary key baseline modification record table, table structure index baseline modification record table, and the like, which may be recorded in the database. In particular by Jekins tools.
After the query is made, the user may also click on the export button to effect export of the various tables described above.
In addition, a complete data dictionary can be generated according to the complete adjustment record table and the initial table structure information.
Specifically, the initial table structure information corresponds to a data dictionary, and then the data dictionary is modified, deleted or added according to the complete adjustment record table, so that the complete data dictionary finally obtained comprises the latest table structure complete set of the table structure information. And the complete data dictionary of each batch of the product can be exported by one key, and the labor for manually maintaining the data dictionary is liberated.
S14, the SQL adjustment data are operated to achieve adjustment of the table structure information corresponding to the target batch information.
In this embodiment, a Jekins tool may be called, so that the Jekins tool runs the SQL adjustment data to implement adjustment of table structure information corresponding to the target lot information.
Specifically, after the SQL adjustment data is obtained, jekins can be called in real time to run the SQL adjustment data in the corresponding database, so that adjustment of the table structure information corresponding to the target batch information is realized.
And if the table structure information corresponding to the target batch information is not successfully adjusted, calling the Jekins tool to enable the Jekins tool to execute rollback operation until the table structure information corresponding to the target batch information is successfully adjusted.
Specifically, if the adjustment of the table structure information fails, the Jekins tool rolls back all operations again and prompts the user of the error reason.
S15, based on the SQL adjustment data, performing synchronous adjustment operation on table structure information corresponding to different batch information corresponding to the product information.
Specifically, referring to fig. 4, step S15 may include:
s31, calling a Jekins tool after the table structure information corresponding to the target batch information is successfully regulated, so that the Jekins tool stores the SQL regulating data into an SVN appointed directory, and stores the SQL regulating data into an appointed position corresponding to a flyback tool.
Specifically, if the Jekins tool successfully executes the adjustment of the table structure information, the Jekins tool uploads the SQL adjustment data, that is, changes the SQL script to the SVN specified directory, and stores the change record (including the current adjustment record table and the complete adjustment record table) to the relevant tables in the database corresponding to the batch, such as the table structure baseline table, the table structure baseline modification record table, the table structure primary key baseline modification record table, the table structure index baseline modification record table, and the like.
In addition, jekins calls SQL adjustment data under the SVN specified directory according to the configuration to store the SQL adjustment data in the specified directory of the machine where the flyback exists.
S32, calling the bypass tool to enable the bypass tool to synchronously adjust table structure information corresponding to the product information and other batch information except the target batch information by using the SQL adjustment data.
The Jekins tool triggers the fly to execute the SQL adjustment data to track down the database structure of the following batch.
In this embodiment, login user information is obtained, product information corresponding to the login user information, batch information corresponding to the product information, and database identifiers corresponding to the batch information are queried, target batch information selected by a user from the batch information corresponding to the product information is obtained, table structure information corresponding to the target batch information is read from a database corresponding to the database identifiers corresponding to the target batch information, and displayed, adjustment operation of the user on the displayed table structure information is received, SQL adjustment data corresponding to the adjustment operation is generated, the SQL adjustment data is operated, adjustment of the table structure information corresponding to the target batch information is achieved, and synchronous adjustment operation is performed on the table structure information corresponding to different batch information corresponding to the product information based on the SQL adjustment data. The invention realizes automatic change of the data structure, and avoids the problems of complex operation, lower efficiency and lower accuracy caused by manual change.
In addition, the invention realizes the whole process management of table structure change management, batch leveling, record inquiry, data dictionary maintenance and data structure change of SQL export. A developer can realize full automation of data structure change management by only changing the table structure on the system, and version management and automatic topdressing of the change SQL can be realized, so that the rapid and effective management of data structure change under the conditions of multiple tasks and high parallelism of a large-scale development team can be realized.
Optionally, on the basis of the embodiment of the data structure changing method, another embodiment of the present invention provides a data structure changing device, referring to fig. 5, may include:
the data determining module 11 is configured to obtain login user information, and query product information corresponding to the login user information, batch information corresponding to the product information, and a database identifier corresponding to the batch information;
the information display module 12 is configured to obtain target batch information selected by a user from the batch information corresponding to the product information, and read and display table structure information corresponding to the target batch information from a database corresponding to a database identifier corresponding to the target batch information;
the adjustment data generation module 13 is used for receiving adjustment operation of a user on the displayed table structure information and generating SQL adjustment data corresponding to the adjustment operation;
an adjustment data operation module 14, configured to operate the SQL adjustment data to implement adjustment of table structure information corresponding to the target lot information;
and the synchronous adjustment module 15 is used for carrying out synchronous adjustment operation on the table structure information corresponding to the different batch information corresponding to the product information based on the SQL adjustment data.
Further, the adjustment data generation module 13 is specifically configured to:
acquiring at least one adjustment sub-operation of the displayed table structure information, which is input by a user on a display interface; the adjustment sub-operation at least comprises adding, deleting or modifying;
determining SQL adjustment sub-data corresponding to each adjustment sub-operation;
and integrating all the SQL adjustment sub data to obtain SQL adjustment data.
Further, the method further comprises the following steps:
the comparison module is used for comparing the adjusted table structure information with the table structure information before adjustment to obtain a current adjustment record table, and comparing the adjusted table structure information with initial table structure information corresponding to the table structure information to obtain a complete adjustment record table; and the table identification information of the current adjustment record table and the complete adjustment record table are related to the adjustment times of the table structure information.
Further, the method further comprises the following steps:
the query module is used for receiving the adjustment query operation; the adjustment query operation comprises target product information to be queried;
determining an adjustment record table corresponding to the target product information; the adjustment record table includes a complete adjustment record table and/or a current adjustment record table.
Further, the method further comprises the following steps:
and the information processing module is used for outputting the latest complete adjustment record table under the condition of reaching the production time point, and generating a complete data dictionary according to the complete adjustment record table and the initial table structure information.
Further, the adjustment data running module 14 is specifically configured to:
and calling a Jekins tool to enable the Jekins tool to operate the SQL adjustment data so as to adjust the table structure information corresponding to the target batch information.
Further, the synchronization adjustment module 15 is specifically configured to:
calling a Jekins tool after the table structure information corresponding to the target batch information is successfully regulated, so that the Jekins tool stores the SQL regulation data into an SVN appointed directory and stores the SQL regulation data into an appointed position corresponding to a fly tool;
and calling the flyback tool to enable the flyback tool to synchronously adjust the table structure information corresponding to the product information and the other batch information except the target batch information by using the SQL adjustment data.
Further, the method further comprises the following steps:
and the rollback module is used for calling the Jekins tool under the condition that the table structure information corresponding to the target batch information is not successfully regulated, so that the Jekins tool executes rollback operation until the table structure information corresponding to the target batch information is successfully regulated.
In this embodiment, login user information is obtained, product information corresponding to the login user information, batch information corresponding to the product information, and database identifiers corresponding to the batch information are queried, target batch information selected by a user from the batch information corresponding to the product information is obtained, table structure information corresponding to the target batch information is read from a database corresponding to the database identifiers corresponding to the target batch information, and displayed, adjustment operation of the user on the displayed table structure information is received, SQL adjustment data corresponding to the adjustment operation is generated, the SQL adjustment data is operated, adjustment of the table structure information corresponding to the target batch information is achieved, and synchronous adjustment operation is performed on the table structure information corresponding to different batch information corresponding to the product information based on the SQL adjustment data. The invention realizes automatic change of the data structure, and avoids the problems of complex operation, lower efficiency and lower accuracy caused by manual change.
It should be noted that, in the working process of each module in this embodiment, please refer to the corresponding description in the above embodiment, and no further description is given here.
Optionally, on the basis of the embodiments of the method and the apparatus for changing a data structure, another embodiment of the present invention provides an electronic device, including: a memory and a processor;
wherein the memory is used for storing programs;
the processor invokes the program and is configured to perform the data structure modification method described above.
In this embodiment, login user information is obtained, product information corresponding to the login user information, batch information corresponding to the product information, and database identifiers corresponding to the batch information are queried, target batch information selected by a user from the batch information corresponding to the product information is obtained, table structure information corresponding to the target batch information is read from a database corresponding to the database identifiers corresponding to the target batch information, and displayed, adjustment operation of the user on the displayed table structure information is received, SQL adjustment data corresponding to the adjustment operation is generated, the SQL adjustment data is operated, adjustment of the table structure information corresponding to the target batch information is achieved, and synchronous adjustment operation is performed on the table structure information corresponding to different batch information corresponding to the product information based on the SQL adjustment data. The invention realizes automatic change of the data structure, and avoids the problems of complex operation, lower efficiency and lower accuracy caused by manual change.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A data structure changing method, comprising:
acquiring login user information, and inquiring product information corresponding to the login user information, batch information corresponding to the product information and a database identifier corresponding to the batch information;
acquiring target batch information selected by a user from the batch information corresponding to the product information, reading and displaying table structure information corresponding to the target batch information from a database corresponding to a database identifier corresponding to the target batch information;
receiving adjustment operation of a user on the displayed table structure information, and generating SQL adjustment data corresponding to the adjustment operation;
operating the SQL adjustment data to realize adjustment of table structure information corresponding to the target batch information;
based on the SQL adjustment data, performing synchronous adjustment operation on table structure information corresponding to different batch information corresponding to the product information, wherein the method comprises the following steps: calling a Jekins tool after the table structure information corresponding to the target batch information is successfully regulated, so that the Jekins tool stores the SQL regulation data into an SVN appointed directory and stores the SQL regulation data into an appointed position corresponding to a fly tool; and calling the flyback tool to enable the flyback tool to synchronously adjust the table structure information corresponding to the product information and the other batch information except the target batch information by using the SQL adjustment data.
2. The method for changing a data structure according to claim 1, wherein receiving an adjustment operation of the presented table structure information by a user and generating SQL adjustment data corresponding to the adjustment operation, comprises:
acquiring at least one adjustment sub-operation of the displayed table structure information, which is input by a user on a display interface; the adjustment sub-operation at least comprises adding, deleting or modifying;
determining SQL adjustment sub-data corresponding to each adjustment sub-operation;
and integrating all the SQL adjustment sub data to obtain SQL adjustment data.
3. The data structure changing method according to claim 1, further comprising, after generating the SQL adjustment data corresponding to the adjustment operation:
comparing the adjusted table structure information with the table structure information before adjustment to obtain a current adjustment record table;
comparing the adjusted table structure information with initial table structure information corresponding to the table structure information to obtain a complete adjustment record table; and the table identification information of the current adjustment record table and the complete adjustment record table are related to the adjustment times of the table structure information.
4. The data structure changing method according to claim 3, further comprising:
receiving an adjustment inquiry operation; the adjustment query operation comprises target product information to be queried;
determining an adjustment record table corresponding to the target product information; the adjustment record table includes a complete adjustment record table and/or a current adjustment record table.
5. The data structure changing method according to claim 3, further comprising:
outputting the latest complete adjustment record table under the condition of reaching the production time point;
and generating a complete data dictionary according to the complete adjustment record table and the initial table structure information.
6. The method of claim 1, wherein running the SQL adjustment data to implement adjustment of table structure information corresponding to the target lot information comprises:
and calling a Jekins tool to enable the Jekins tool to operate the SQL adjustment data so as to adjust the table structure information corresponding to the target batch information.
7. The method according to claim 6, further comprising, in the case where the table structure information corresponding to the target lot information is not successfully adjusted:
and calling the Jekins tool to enable the Jekins tool to execute rollback operation until the table structure information corresponding to the target batch information is successfully adjusted.
8. A data structure changing apparatus, comprising:
the data determining module is used for acquiring login user information and inquiring product information corresponding to the login user information, batch information corresponding to the product information and database identifiers corresponding to the batch information;
the information display module is used for acquiring target batch information selected by a user from the batch information corresponding to the product information, reading the table structure information corresponding to the target batch information from a database corresponding to the database identifier corresponding to the target batch information, and displaying the table structure information;
the adjustment data generation module is used for receiving adjustment operation of a user on the displayed table structure information and generating SQL adjustment data corresponding to the adjustment operation;
the adjustment data operation module is used for operating the SQL adjustment data so as to realize adjustment of the table structure information corresponding to the target batch information;
the synchronous adjustment module is configured to perform synchronous adjustment operation on table structure information corresponding to different batch information corresponding to the product information based on the SQL adjustment data, where the synchronous adjustment module includes: calling a Jekins tool after the table structure information corresponding to the target batch information is successfully regulated, so that the Jekins tool stores the SQL regulation data into an SVN appointed directory and stores the SQL regulation data into an appointed position corresponding to a fly tool; and calling the flyback tool to enable the flyback tool to synchronously adjust the table structure information corresponding to the product information and the other batch information except the target batch information by using the SQL adjustment data.
9. An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
a processor calling a program and being adapted to perform the data structure modification method of any of claims 1-7.
CN202111039474.3A 2021-09-06 2021-09-06 Data structure changing method and device and electronic equipment Active CN113672626B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111039474.3A CN113672626B (en) 2021-09-06 2021-09-06 Data structure changing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111039474.3A CN113672626B (en) 2021-09-06 2021-09-06 Data structure changing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113672626A CN113672626A (en) 2021-11-19
CN113672626B true CN113672626B (en) 2024-02-13

Family

ID=78548757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111039474.3A Active CN113672626B (en) 2021-09-06 2021-09-06 Data structure changing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113672626B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490594B (en) * 2022-02-16 2024-12-13 中银金融科技有限公司 A database management method, device, electronic equipment and computer storage medium
CN115374089A (en) * 2022-09-06 2022-11-22 中国建设银行股份有限公司 Method, device, medium and electronic equipment for generating version package of database

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678532A (en) * 2013-12-02 2014-03-26 中国移动(深圳)有限公司 Alternation statement reverse analysis method, database alternating and backspacing method and database alternating and backspacing system
CN108255925A (en) * 2017-11-10 2018-07-06 平安普惠企业管理有限公司 A kind of display methods and its terminal of data list structure alteration
CN109885581A (en) * 2019-03-14 2019-06-14 苏州达家迎信息技术有限公司 Synchronous method, device, equipment and the storage medium of database
CN110633284A (en) * 2019-09-19 2019-12-31 中国工商银行股份有限公司 Method and device for changing table in database
CN113204558A (en) * 2021-05-25 2021-08-03 城云科技(中国)有限公司 Method and device for automatically updating data table structure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678532A (en) * 2013-12-02 2014-03-26 中国移动(深圳)有限公司 Alternation statement reverse analysis method, database alternating and backspacing method and database alternating and backspacing system
CN108255925A (en) * 2017-11-10 2018-07-06 平安普惠企业管理有限公司 A kind of display methods and its terminal of data list structure alteration
CN109885581A (en) * 2019-03-14 2019-06-14 苏州达家迎信息技术有限公司 Synchronous method, device, equipment and the storage medium of database
CN110633284A (en) * 2019-09-19 2019-12-31 中国工商银行股份有限公司 Method and device for changing table in database
CN113204558A (en) * 2021-05-25 2021-08-03 城云科技(中国)有限公司 Method and device for automatically updating data table structure

Also Published As

Publication number Publication date
CN113672626A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
US11334594B2 (en) Data model transformation
KR101013810B1 (en) Excel based DW table update system and method
US20100280990A1 (en) Etl for process data warehouse
US20110145210A1 (en) System and Method for Managing One or More Databases
CN107291471B (en) Meta-model framework system supporting customizable data acquisition
CN107480262A (en) A kind of general management system of database based on webpage
US20060129609A1 (en) Database synchronization using change log
CN113672626B (en) Data structure changing method and device and electronic equipment
CN103810224A (en) Information persistence and query method and device
CN111026670B (en) Test case generation method, test case generation device and storage medium
US20150073955A1 (en) Management interface for business management applications
CN113515564B (en) J2 EE-based data access method, device, equipment and storage medium
US10289620B1 (en) Reporting and data governance management
CN103678396A (en) Data backup method and device based on data models
US11442907B2 (en) Automatic conversion of data models using data model annotations
CN115114325B (en) Data query method and device, electronic equipment and storage medium
CN116956817A (en) Part coding method, process flow determining method and flat electronic product
CN104731597A (en) Method for applying SQL statements to engineering software compiling platform
US10318524B2 (en) Reporting and data governance management
CN116483800A (en) Method and device for changing database information
KR20160093289A (en) Method for managing property and system using the same
CN117348916B (en) Script generation method, device, equipment and storage medium
US20060277222A1 (en) Persistent data file translation settings
US20250258776A1 (en) Application stack read-only replica with application specific write buffer
US12174887B2 (en) Mapping expression generator

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
GR01 Patent grant
GR01 Patent grant