CN113204558B - Automatic data table structure updating method and device - Google Patents
Automatic data table structure updating method and device Download PDFInfo
- Publication number
- CN113204558B CN113204558B CN202110569504.5A CN202110569504A CN113204558B CN 113204558 B CN113204558 B CN 113204558B CN 202110569504 A CN202110569504 A CN 202110569504A CN 113204558 B CN113204558 B CN 113204558B
- Authority
- CN
- China
- Prior art keywords
- data table
- information
- updated
- data
- field
- 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
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/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- 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/21—Design, administration or maintenance of databases
-
- 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/23—Updating
-
- 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
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides an automatic updating method of a data table structure, wherein the method can automatically analyze a target data table to obtain table structure information of the target data table, and when an operation and maintenance person updates or deploys projects, the automatic updating device of the data table structure can automatically compare the table structure information in a target database with the table structure information in a database to be updated to generate a corresponding SQL script so as to complete updating and maintenance of the data table to be updated, thereby avoiding a plurality of problems caused by manually archiving and summarizing the SQL script executable by the database.
Description
Technical Field
The present invention relates to the field of software development, and in particular, to a method and apparatus for automatically updating a data table structure.
Background
At present, a software product often needs continuous optimization updating, and the optimization updating often inevitably causes structural updating of a data table supporting the software product. Aiming at the condition that the data table is structurally changed, operation and maintenance personnel often need to upgrade the database through the database document provided by the developer, and then upgrade the product.
In order to realize the upgrade of the database and the product of the project side by the operation and maintenance personnel, in the process of developing part of software, a developer often needs to sort the data table document with changed structure and archive the SQL script executable by the database, however, the mode exists: the method can not be changed and recorded in time, and the changing and recording process is very troublesome; that is, the above steps need to be repeated every time a data table change occurs, increasing the workload of developers and operation and maintenance personnel. In addition, post-summary sorting of the spreadsheet documents is also relatively error-prone. Because the SQL script has stronger specificity, if some SQL sentences are not successfully executed, the functions of the SQL script after the final software update are abnormal, and when the SQL script cannot be successfully executed completely, the operation and development parties are required to communicate, the positions and the contents of the error sentences are checked, the development parties carry out error analysis and SQL sentence modification and then give the operation and maintenance personnel to execute, a large amount of communication cost and error-removing cost are required for the operation and maintenance personnel and the development personnel, and the data table update efficiency is low.
Of course, there is a database version management tool, which can be used to manage SQL scripts in different situations like the code of different people in the git management, but the database version management tool is only used to facilitate the management of SQL script statements, which still requires the developer to update the SQL scripts in real time, and the database version management tool has a more complex file naming specification and needs to be applied to the database to record the running version number thereof, thus resulting in complex operation procedures and requiring the management of people with expert knowledge.
Therefore, there is a need for a convenient, less invasive, and reliable method and apparatus for automatically updating a data table structure.
Disclosure of Invention
The invention aims to provide an automatic updating method of a data table structure, which can automatically analyze a target data table to obtain table structure information of the target data table, and when an operation and maintenance person updates or deploys projects, the automatic updating device of the data table structure can automatically compare the table structure information in the target database with the table structure information in the database to be updated to generate a corresponding SQL script so as to complete updating and maintenance of the data table to be updated, thereby avoiding a plurality of problems caused by manually archiving and summarizing the SQL script executable by the database; the automatic updating method of the data table structure has the advantages of convenience, less invasion and strong reliability.
The embodiment of the application provides an automatic updating method of a data table structure, which comprises the following steps: acquiring a target data table from a target database, and acquiring a data table to be updated from a database to be updated; analyzing the target data table to generate table structure information of the target data table, and analyzing the data table to be updated to generate table structure information of the data table to be updated; and comparing the table structure information of the target data table with the table structure information of the data table to be updated, generating a statement for updating the data table to be updated and executing the statement.
Based on the same conception, the embodiment of the application provides an automatic updating device for a data table structure, which comprises the following components: the acquisition module is used for acquiring a target data table from the target database and acquiring the data table to be updated from the database to be updated; the analysis module is used for analyzing the target data table to generate the table structure information of the target data table, and analyzing the data table to be updated to generate the table structure information of the data table to be updated; and the updating module is used for comparing the table structure information of the target data table with the table structure information of the data table to be updated, generating a statement for updating the data table to be updated and executing the statement.
In addition, an embodiment of the present application proposes a computer device, characterized in that it includes one or more processors and one or more memories, where at least one program code is stored, where the at least one program code is loaded and executed by the one or more processors to implement the operations performed by the automatic updating method of a data table structure according to any of claims 1 to 7.
Meanwhile, an embodiment of the present application proposes a storage medium, wherein a computer program is stored in the storage medium, and wherein the computer program is configured to execute the automatic update method of the data table structure according to any one of claims 1 to 7 when running.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a flow chart of a method for automatically updating a data table structure according to an embodiment of the present application;
FIG. 2 is a block diagram of an automatic data table structure update apparatus according to an embodiment of the present application;
FIG. 3 is a data flow diagram of a method/apparatus for automatically updating a data table structure according to an embodiment of the present application;
FIG. 4 is a flow chart of a method of generating data table structure information according to an embodiment of the present application;
fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
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 are derived by a person skilled in the art based on the embodiments of the invention, fall within the scope of protection of the invention.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
To facilitate understanding of this embodiment, a brief description of the database will be first provided. Databases are typically composed of a plurality of data tables, a column of which is referred to as a field, for defining attributes of the data in one dimension, such as "name", "number", "grade", "gender", etc.; one row of the data table is referred to as a record or data for holding a piece of user information containing dimension information of the respective fields. Typically, upon application upgrades, the table structure of some or all of the data tables may be modified, such as deleting certain fields or adding certain fields. Updating of the database is achieved by modification of the table structure or modification of the records in the data table. In practical application, the data table may be a data table related to a service (abbreviated as a service table), or may be a data table related to other aspects.
The embodiment provides an automatic data table structure updating method, which is loaded on an automatic data table structure updating device to operate, wherein the automatic data table structure updating device can be realized in a software mode and can also be integrated into a project as a plug-in. In an actual application scene, a developer can integrate the device into a project as a plug-in, a database of the project corresponding to the developer is used as a target database, and after the project is completed, the project integrated with the automatic updating device of the data table structure is delivered to the project side; when the project party updates or deploys the project, the databases of the project party also need to be synchronously updated, so the automatic data table structure updating device takes the databases of the project party as the databases to be updated and updates the databases.
Fig. 3 is a data flow diagram of a method/apparatus for automatically updating a data table structure according to an embodiment of the present application. Specifically, as shown in fig. 3, the project of the developer includes a first configuration file, where connection information of the target database is recorded in the first configuration file, and the obtaining module of the device obtains the target data table by reading the connection information of the target database in the first configuration file, connecting the target database, and sending a request to the target database. And then analyzing the target data table to obtain the table structure information of the corresponding target data table. In general, the target database includes a plurality of target data tables, and the device may further package and output table structure information of all the target data tables to form a table structure file, and record a storage directory of the table structure file into the first configuration file according to needs.
After the project is completed, the developer packages and delivers the project to the project party, wherein the project at least comprises project source codes, a first configuration file and a table structure file which are integrated with the automatic data table structure updating device. When the project is deployed by the project side, a second configuration file recorded with the connection information of the database to be updated is imported into the automatic data table structure updating device, an acquisition module of the device is connected with the database to be updated by reading the connection information of the database to be updated in the second configuration file and sending a request to the database to be updated, a data table to be updated is acquired, then the data table to be updated is analyzed, table structure information corresponding to the data table to be updated is obtained, and a plurality of data tables to be updated are also included in the database to be updated in general. The acquisition module of the device acquires the storage catalog of the table structure file by reading the first configuration file, acquires the table structure file and analyzes the table structure file into the table structure information of the target data table. When a plurality of target data tables and a plurality of data tables to be updated exist, adding a missing data table to be updated to the data base to be updated, deleting redundant data tables to be updated, comparing the table structure information of the target data tables with the same table names with the table structure information of the data tables to be updated, generating sentences for updating the data tables to be updated, and executing the sentences.
Example 1
Fig. 1 is a flowchart of a data table structure automatic updating method according to an embodiment of the present application, as shown in fig. 1, the method includes the following steps S101 to S103:
step S101, a target data table is obtained from a target database, and the data table to be updated is obtained from a database to be updated;
step S102, analyzing the target data table to generate table structure information of the target data table, and analyzing the data table to be updated to generate table structure information of the data table to be updated;
step S103, comparing the table structure information of the target data table with the table structure information of the data table to be updated, generating a statement for updating the data table to be updated and executing the statement.
Fig. 2 is a block diagram of a data table structure automatic updating apparatus according to an embodiment of the present application.
The automatic data table structure updating method is loaded and operated on an automatic data table structure updating device, as shown in fig. 2, and the device comprises:
the obtaining module 201 is configured to obtain a target data table from a target database, and obtain a data table to be updated from a database to be updated.
In this embodiment, the project of the developer includes a first configuration file, in which connection information of the target database is recorded, and the acquisition module of the device acquires the first configuration file, reads the connection information of the target database recorded therein, connects the target database, and sends a request to the target database to acquire the target data table. After the developer packages and delivers the completed project to the project side, the project side integrates an automatic data table structure updating device, the project side guides a second configuration file recorded with the connection information of the database to be updated into the automatic data table structure updating device, and likewise, an acquisition module of the device acquires the second configuration file, reads the connection information of the database to be updated recorded in the second configuration file, connects the database to be updated, sends a request to the database to be updated, and acquires the data table to be updated.
In general, the target database contains a plurality of target data tables, and the database to be updated also contains a plurality of data tables to be updated, wherein the table structure of the target data table is shown in table 1-1, and the table structure of the data table to be updated is shown in table 1-2 by taking the target data table and the data table to be updated, which are all named as student_info, as examples.
TABLE 1-1
TABLE 1-2
In tables 1-1 and 1-2, "true" means "yes," false "means" no, "and"/"means that the field does not have the corresponding information.
The parsing module 202 is configured to parse the target data table to generate table structure information of the target data table, and parse the data table to be updated to generate table structure information of the data table to be updated.
Fig. 4 is a flowchart of a data table structure information generating method according to an embodiment of the present application.
As shown in fig. 4, in the present embodiment, generating the table structure information of the target data table and generating the table structure information of the data table to be updated includes steps S401 to S403:
in step S401, a field information class is defined.
In step S401, the attributes of the field information class include: table name tableName, field name fieldName, field type fieldType, field length, whether primary key isPK, whether nullable allowances, comment comments.
Step S402, analyzing field information of at least one field in the target data table to instantiate the field information class to obtain a field information object corresponding to the field, and combining the field information objects to obtain table structure information of the target data table.
In step S402, the parsing module of the device parses the target data table, taking the student_name field in the target data table as an example, and the field information of the field is: the student_name field belongs to the student_info table, the field type is varchar, the field length is 100, the name is not a primary key, the annotation is "student name", and the name cannot be null. The field information class is then instantiated with field information for the field to obtain a field information object, which can be expressed as:
{“tableName”: “student_info”,
“fieldName”: “student_name”,
“fieldType”: “varchar”,
“length”: 100,
“isPK”: false,
"comment" means "student name",
“allowNull”: false}
from Table 1-1, it can be seen that there are a total of 6 fields in the target data table, respectively: id. student_ name, age, sex, telephone, address. All the 6 fields are instantiated according to the method to obtain 6 field information objects. The device combines the 6 field information objects to obtain the table structure information of the target data table.
In general, the target database includes a plurality of target data tables, and the device may further package and output table structure information of all the target data tables to form a table structure file, and record a storage directory of the table structure file into the first configuration file according to needs. After the project is completed, the developer packages and delivers the project to the project party, wherein the project at least comprises project source codes, a first configuration file and a table structure file which are integrated with the automatic data table structure updating device. When the project party deploys the project, an acquisition module of the device acquires a storage directory of the table structure file by reading the first configuration file, acquires the table structure file and analyzes the table structure file into table structure information of the target data table.
Step S403, analyzing the field information of at least one field in the data table to be updated to instantiate the field information class, obtaining a field information object corresponding to the field, and combining the field information objects to obtain the table structure information of the data table to be updated.
According to the same method as step S402, the parsing module of the device parses the data table to be updated, and generates table structure information of the data table to be updated.
And the updating module 203 is configured to compare the table structure information of the target data table with the table structure information of the data table to be updated, generate a statement for updating the data table to be updated, and execute the statement.
In this embodiment, after obtaining the table structure information of the target data table and the table structure information of the data table to be updated, the two are compared.
According to the table structure information of the target data table and the table structure information of the data table to be updated, it can be seen that the field address only exists in the target data table, so that an address field needs to be newly added to the data table to be updated, and a statement "ALTER TABLE student _ info ADD address varchar (255) NULL component 'address'" for updating the data table to be updated is generated; the home_phone field exists only in the data table to be updated, so that the home_phone field in the data table to be updated needs to be deleted, and a statement "ALTER TABLE student _ info DROP COLUMN home _phone" for updating the data table to be updated is generated; in addition, there are 5 identical fields in the target data table and the data table to be updated, wherein the field length of the student_name field in the target data table is 100, and the field length of the student_name field in the data table to be updated is 50, so that the field length of the student_name field in the data table to be updated needs to be modified, and the statement "ALTER TABLE student _ info MODIFY student _name varchar (100)", used for updating the data table to be updated, is generated.
After all the comparisons are completed, the generated sentences are sequentially executed to complete the updating of the data table to be updated. When the target database contains a plurality of target data tables, adding the target data tables only existing in the target database into the database to be updated, deleting the data tables only existing in the database to be updated from the database to be updated, and then comparing the target data tables with the same table names with the data tables to be updated to generate sentences for updating the data tables to be updated according to the method and executing the sentences.
Example two
Based on the automatic updating method of the data table structure in the first embodiment, the embodiment also provides a data table initializing method. The developer configures a table name to be initialized in the first configuration file, and the automatic data table structure updating device connects the target database according to the table name in the first configuration file and the connection information of the target database, acquires a target data table corresponding to the table name, analyzes the target data table to obtain data information, and automatically generates a statement for initializing the data table to be updated.
FIG. 2 is a flow chart of a data table initialization method according to an embodiment of the present application, as shown in FIG. 1, comprising the steps of:
a class of data information is defined.
In this step, the attributes of the data information class include: table name tableName, field name list fieldname list, data list dataList.
Analyzing at least one field in the target data table to form a field name list and at least one piece of data to form a data list, instantiating the data information class to obtain a data information object corresponding to the target data table, and packaging the data information object into initialized data information.
In this step, the target data table with the table name student_info in the first embodiment is taken as an example, and the data in the target data table is shown in table 2.
TABLE 2
As can be seen from table 2, there are 6 fields in the target data table, respectively: id. student_ name, age, sex, telephone, address:4 pieces of data, respectively: (1, 'Zhang Sanl' NULL, NULL, NULL, NULL), (2, 'Lifour' NULL, NULL, NULL, NULL), (3, 'Wang Wu' NULL, NULL, NULL, NULL), (4, 'Zhao Liu' NULL, NULL, NULL, NULL), parsing the target data table, instantiating the data information class, resulting in a data information object represented as:
{“tableName”:“student_info”,
“fieldNameList”:[‘id’,‘student_name’,‘age’,‘sex’,‘telephone’,‘address’],
“dataList”:
[ [1, 'Zhang San', NULL, NULL, NULL, NULL ],
[2, 'Lifour', NULL, NULL, NULL, NULL ],
[3, 'Wangwu', NULL, NULL, NULL, NULL ],
[4, 'Zhao Liu', NULL, NULL, NULL, NULL ] ] }
In general, a developer configures a plurality of table names to be initialized in a first configuration file, instantiates data information classes according to all table names to be initialized to obtain a plurality of data information objects according to the method, encapsulates all data information objects into initialized data information, outputs the initialized data information into an initialized data file, and records a storage directory of the initialized data file into the first configuration file.
And generating a statement for initializing the data table to be updated according to the initialization data information and executing the statement.
In the step, after delivering the project integrated with the automatic updating device of the data table structure to the project side, the project side operates the device to obtain a first configuration file, finds the initialization data file under the corresponding directory according to the storage directory of the initialization data file recorded in the first configuration file, analyzes the initialization data file into initialization data information, and generates a statement for initializing the data table to be updated, which is required to be initialized, in the database to be updated. And then reading the connection information of the database to be updated in the second configuration file, connecting the database to be updated and executing initialization operation.
The present embodiment also provides an electronic device comprising a memory 304 and a processor 302, the memory 304 having stored therein a computer program, the processor 302 being arranged to run the computer program to perform the steps of any of the method embodiments described above.
In particular, the processor 302 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
The processor 302 reads and executes the computer program instructions stored in the memory 304 to implement any orphan or orphan behavior analysis method in the above embodiment.
Optionally, the electronic apparatus may further include a transmission device 306 and an input/output device 308, where the transmission device 306 is connected to the processor 302, and the input/output device 308 is connected to the processor 302.
Alternatively, in the present embodiment, the above-mentioned processor 302 may be configured to execute the following steps by a computer program:
step S101, a target data table is obtained from a target database, and the data table to be updated is obtained from a database to be updated;
step S102, analyzing the target data table to generate table structure information of the target data table, and analyzing the data table to be updated to generate table structure information of the data table to be updated;
step S103, comparing the table structure information of the target data table with the table structure information of the data table to be updated, generating a statement for updating the data table to be updated and executing the statement.
The transmission device 306 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through the base station to communicate with the internet. In one example, the transmission device 306 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
The input-output device 308 is used to input or output information. For example, the input/output device may be a display screen, a mouse, a keyboard, or other devices. In this embodiment, the input device is configured to input acquired information, where the input information may be data, a table, an image, a real-time video, and the output information may be text, a chart, and alarm information displayed by the service system.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (8)
1. The automatic updating method of the data table structure is characterized by comprising the following steps:
acquiring a target data table from a target database, and acquiring a data table to be updated from a database to be updated;
defining field information class; analyzing field information of at least one field in the target data table to instantiate the field information class to obtain a field information object corresponding to the field, and combining the field information object to obtain table structure information of the target data table; analyzing field information of at least one field in the data table to be updated to instantiate the field information class to obtain a field information object corresponding to the field, and combining the field information object to obtain table structure information of the data table to be updated;
comparing the table structure information of the target data table with the table structure information of the data table to be updated, generating a statement for updating the data table to be updated and executing the statement;
the method for initializing the data table comprises the following steps:
defining a data information class;
analyzing at least one field in the target data table to form a field name list and at least one piece of data to form a data list, instantiating the data information class to obtain a data information object corresponding to the target data table, and packaging the data information object into initialized data information;
and generating a statement for initializing the data table to be updated according to the initialization data information and executing the statement.
2. The automatic updating method of a data table structure according to claim 1, wherein "obtaining a target data table from a target database, obtaining a data table to be updated from a database to be updated" comprises the steps of:
acquiring a first configuration file corresponding to the target database, reading connection information of the target database recorded in the first configuration file, connecting the target database and requesting to acquire a target data table;
and acquiring a second configuration file corresponding to the database to be updated, reading the connection information of the database to be updated recorded in the second configuration file, connecting the database to be updated and requesting to acquire a data table to be updated.
3. The method of claim 2, wherein the table structure information of the target data table is output as a table structure file, and the first configuration file further includes a storage directory of the table structure file.
4. The method for automatically updating a data table structure according to claim 3, wherein before comparing the table structure information of the target data table with the table structure information of the data table to be updated, the storage directory of the table structure file is obtained through the first configuration file, and the table structure file is analyzed to obtain the table structure information of the target data table.
5. The method of claim 2, wherein the initialization data information is output as an initialization data file, and wherein the first configuration file further includes a storage directory of the initialization data file.
6. The automatic updating device of data table structure is characterized by comprising:
the acquisition module is used for acquiring a target data table from the target database and acquiring the data table to be updated from the database to be updated;
the analysis module is used for defining field information classes; analyzing field information of at least one field in the target data table to instantiate the field information class to obtain a field information object corresponding to the field, and combining the field information object to obtain table structure information of the target data table; analyzing field information of at least one field in the data table to be updated to instantiate the field information class to obtain a field information object corresponding to the field, and combining the field information object to obtain table structure information of the data table to be updated; defining a data information class, analyzing at least one field in the target data table to form a field name list and at least one piece of data to form a data list, instantiating the data information class to obtain a data information object corresponding to the target data table, and packaging the data information object into initialized data information;
the updating module is used for comparing the table structure information of the target data table with the table structure information of the data table to be updated, generating a statement for updating the data table to be updated and executing the statement; and generating a statement for initializing the data table to be updated according to the initialization data information and executing the statement.
7. A computer device comprising one or more processors and one or more memories, the one or more memories having stored therein at least one program code that is loaded and executed by the one or more processors to implement the operations performed by the automatic data table structure updating method of any of claims 1-5.
8. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of automatically updating a data table structure according to any of claims 1-5 when run.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110569504.5A CN113204558B (en) | 2021-05-25 | 2021-05-25 | Automatic data table structure updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110569504.5A CN113204558B (en) | 2021-05-25 | 2021-05-25 | Automatic data table structure updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113204558A CN113204558A (en) | 2021-08-03 |
CN113204558B true CN113204558B (en) | 2023-05-26 |
Family
ID=77023078
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110569504.5A Active CN113204558B (en) | 2021-05-25 | 2021-05-25 | Automatic data table structure updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113204558B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113672626B (en) * | 2021-09-06 | 2024-02-13 | 中国银行股份有限公司 | Data structure changing method and device and electronic equipment |
CN118467579A (en) * | 2024-07-10 | 2024-08-09 | 深圳前海量子云码科技有限公司 | Database structure processing method, device, equipment and storage medium |
CN118733061A (en) * | 2024-08-30 | 2024-10-01 | 中免日上互联科技有限公司 | Automatic deployment method, system, equipment and medium for database |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2096559A1 (en) * | 2008-02-27 | 2009-09-02 | Nextair Corporation | Method and software for facilitating interaction with a personal information manager application at a wireless communication device |
CN107766353A (en) * | 2016-08-17 | 2018-03-06 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus of statistics of database information transfer |
CN110990412A (en) * | 2019-12-25 | 2020-04-10 | 中国银行股份有限公司 | Data structure design method and device |
CN111444208A (en) * | 2020-03-25 | 2020-07-24 | 平安医疗健康管理股份有限公司 | Data updating method and related equipment |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9009850B2 (en) * | 2012-06-25 | 2015-04-14 | Bank Of America Corporation | Database management by analyzing usage of database fields |
US10866938B2 (en) * | 2016-07-29 | 2020-12-15 | Sap Se | Automated reshaping and restructuring of storage structures |
CN108255925B (en) * | 2017-11-10 | 2021-12-10 | 平安普惠企业管理有限公司 | Method and terminal for displaying data table structure change condition |
CN109885581B (en) * | 2019-03-14 | 2021-09-17 | 苏州达家迎信息技术有限公司 | Database synchronization method, device, equipment and storage medium |
CN111367924B (en) * | 2020-02-26 | 2024-01-02 | 杭州数梦工场科技有限公司 | Data synchronization method, device, electronic equipment and storage medium |
CN112015722A (en) * | 2020-11-02 | 2020-12-01 | 浙江大华技术股份有限公司 | Database management method, data blood relationship analysis method and related device |
-
2021
- 2021-05-25 CN CN202110569504.5A patent/CN113204558B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2096559A1 (en) * | 2008-02-27 | 2009-09-02 | Nextair Corporation | Method and software for facilitating interaction with a personal information manager application at a wireless communication device |
CN107766353A (en) * | 2016-08-17 | 2018-03-06 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus of statistics of database information transfer |
CN110990412A (en) * | 2019-12-25 | 2020-04-10 | 中国银行股份有限公司 | Data structure design method and device |
CN111444208A (en) * | 2020-03-25 | 2020-07-24 | 平安医疗健康管理股份有限公司 | Data updating method and related equipment |
Non-Patent Citations (1)
Title |
---|
数据表结构的动态创建与动态更新;李文华,杨奔全;中国科技信息(05) * |
Also Published As
Publication number | Publication date |
---|---|
CN113204558A (en) | 2021-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113204558B (en) | Automatic data table structure updating method and device | |
US10928970B2 (en) | User-interface for developing applications that apply machine learning | |
US11030083B2 (en) | Systems and methods for reducing storage required for code coverage results | |
AU2009238294B2 (en) | Data transformation based on a technical design document | |
CN108037961A (en) | A kind of application program collocation method, device, server and storage medium | |
US11979300B2 (en) | Standardized format for containerized applications | |
CN111258989A (en) | Database migration evaluation method and device, storage medium and computer equipment | |
CN111651468B (en) | SQL analysis-based data updating method and device, electronic equipment and storage medium | |
CN111683066B (en) | Heterogeneous system integration method, heterogeneous system integration device, computer equipment and storage medium | |
US20150178065A1 (en) | Dynamic delivery and integration of static content into cloud | |
US20130339779A1 (en) | Systematic failure remediation | |
CN113138781B (en) | CSV configuration updating method and storage medium | |
CN112732663A (en) | Log information processing method and device | |
US11977862B2 (en) | Automatically cataloging application programming interface (API) | |
US10146822B1 (en) | Automated script generator for processing storage system data files | |
US20220207033A1 (en) | Systems and methods for data retrieval | |
CN114490526B (en) | Course selection index file updating method, course searching method and device | |
CN116483344A (en) | Code generation method and device, terminal equipment and computer readable storage medium | |
CN114510914A (en) | Railway power supply informatization Excel data import method and device and storage medium | |
CN114116866A (en) | Data acquisition method and device, terminal equipment and storage medium | |
CN113704120A (en) | Data transmission method, device, equipment and storage medium | |
CN106227855A (en) | A kind of transacter, system and method | |
CN116594848B (en) | Task monitoring method, device, equipment, terminal equipment and storage medium | |
JP7344521B1 (en) | Program, method, information processing device, and system | |
CN116243961A (en) | Version file processing method and device, electronic equipment and storage medium |
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 |