CN111190905A - Database table processing method and device and electronic equipment - Google Patents

Database table processing method and device and electronic equipment Download PDF

Info

Publication number
CN111190905A
CN111190905A CN201911408742.7A CN201911408742A CN111190905A CN 111190905 A CN111190905 A CN 111190905A CN 201911408742 A CN201911408742 A CN 201911408742A CN 111190905 A CN111190905 A CN 111190905A
Authority
CN
China
Prior art keywords
database
processing instruction
automatic processing
determining
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911408742.7A
Other languages
Chinese (zh)
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.)
Beijing Wizard World Technology Co Ltd
Original Assignee
Beijing Wizard World Technology Co 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 Beijing Wizard World Technology Co Ltd filed Critical Beijing Wizard World Technology Co Ltd
Priority to CN201911408742.7A priority Critical patent/CN111190905A/en
Publication of CN111190905A publication Critical patent/CN111190905A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Landscapes

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

Abstract

The disclosure relates to a database table processing method, a database table processing device, an electronic device and a computer readable medium. The method comprises the following steps: acquiring a first table in a first database and a second table in a second database; comparing the data structures of the first table and the second table through a database statement to generate a comparison result; generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and determining to execute the first automatic processing instruction or the second automatic processing instruction according to a preset strategy. The database table processing method, the database table processing device, the electronic equipment and the computer readable medium can quickly compare tables in different databases, locate the difference items, and automatically revise the difference items, so that the consistency and the accuracy of data among the databases can be ensured, and the safety problem of the databases caused by misoperation of common tables among the databases is reduced.

Description

Database table processing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to a database table processing method, apparatus, electronic device, and computer readable medium.
Background
The data table is composed of three parts of a table name, fields in the table and records of the table. Designing a data table structure is to define the file name of the data table, determine which fields the data table contains, the field name, the field type, and the width of each field, and input these data into the computer. Before a table is built, its structure must be designed, which describes the frame of a table. The design table structure actually defines the number of fields forming a table, and the name, data type, length and other information of each field.
In an actual system, data is often transmitted or shared between different service servers through a data table, in order to make the data between different systems accurate and effective and avoid generating system data errors or other unknown errors, for a table storing the same kind of data, the structure of the corresponding data table should be constant between different service servers. However, the service is continuously developed, and as the service is developed, a new requirement is generated, the table structure of the database of the development end continuously evolves as the development progresses, and after the table structure of the database of the development end is updated, if the change of the data structure cannot be found in time in other service servers, a serious system error is likely to be generated. At present, the change of the data structure is often realized by comparing tables manually, tedious comparison work needs to be carried out, and if the comparison is completed by people, errors are often generated, and the efficiency is not high.
Therefore, a new database table processing method, apparatus, electronic device and computer readable medium are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present disclosure provides a method and an apparatus for processing tables in a database, an electronic device, and a computer readable medium, which can quickly compare tables in different databases, locate difference items, and automatically revise the difference items, so as to ensure consistency and accuracy of data between the databases and reduce database security problems caused by misoperation of common tables between the databases.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, a database table processing method is provided, which includes: acquiring a first table in a first database and a second table in a second database; comparing the data structures of the first table and the second table through a database statement to generate a comparison result; generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and determining to execute the first automatic processing instruction or the second automatic processing instruction according to a preset strategy.
Optionally, obtaining a first table in the first database and a second table in the second database includes: determining the first database and the second database according to a user instruction; determining a target table name; and searching the first database and the second database based on the target table to obtain the first table and the second table.
Optionally, determining the target table name includes: and determining the name of the target table according to preset parameters.
Optionally, the preset parameters include: presetting a time range, and determining a target table name according to preset parameters, wherein the method comprises the following steps: and acquiring the table modified within the preset time range as a target table.
Optionally, comparing the data structures of the first table and the second table through a database statement to generate a comparison result, including: acquiring field names in the first table and the second table item by item through database statements; and comparing the field names in the first table and the second table to generate the comparison result.
Optionally, determining to execute the first automatic processing instruction or the second automatic processing instruction according to a preset policy includes: and comparing the attributes of the first database and the attributes of the second database with the preset strategy to determine to execute a first automatic processing instruction or a second automatic processing instruction.
Optionally, comparing the attribute of the first database and the attribute of the second database with the preset policy to determine to execute the first automatic processing instruction or the second automatic processing instruction, including: and when the first database is a development database and the second database is a production database, determining to execute a first automatic processing instruction.
Optionally, comparing the attribute of the first database and the attribute of the second database with the preset policy to determine to execute the first automatic processing instruction or the second automatic processing instruction, including: and when the first database is a development database and the second database is a test database, determining to execute a second automatic processing instruction.
Optionally, determining to execute the first automatic processing instruction or the second automatic processing instruction comprises: processing a first table in a first database through a first automatic processing instruction; or processing a second table in a second database via a second automatic processing instruction.
Optionally, the method further comprises: and generating a task execution table to inform a user when the first automatic processing instruction or the second automatic processing instruction is executed.
According to an aspect of the present disclosure, a database table processing apparatus is provided, the apparatus including: the table module is used for acquiring a first table in a first database and a second table in a second database; the comparison module is used for comparing the data structures of the first table and the second table through database statements to generate a comparison result; the instruction module is used for generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and the execution module is used for determining to execute the first automatic processing instruction or the second automatic processing instruction according to a preset strategy.
Optionally, the table module includes: the database unit is used for determining the first database and the second database according to a user instruction; a name unit for determining a target table name; and a table unit for searching in the first database and the second database based on the target table to obtain the first table and the second table.
Optionally, the name unit is further configured to determine a target table name according to preset parameters.
Optionally, the preset parameters include: the name unit is also used for acquiring the table modified in the preset time range to serve as a target table.
Optionally, the comparison module includes: the acquisition unit is used for acquiring field names in the first table and the second table one by one through database statements; and the comparison unit is used for comparing the field names in the first table and the second table to generate the comparison result.
Optionally, the execution module includes: and the judging unit is used for comparing the attribute of the first database and the attribute of the second database with the preset strategy so as to determine to execute the first automatic processing instruction or the second automatic processing instruction.
Optionally, the determining unit includes: and the first execution subunit is used for determining to execute a first automatic processing instruction when the first database is a development database and the second database is a production database.
Optionally, the determining unit includes: and the second execution subunit determines to execute a second automatic processing instruction when the first database is a development database and the second database is a test database.
Optionally, the execution module is further configured to process the first table in the first database through the first automatic processing instruction; or processing a second table in a second database via a second automatic processing instruction.
Optionally, the method further comprises: and the notification module is used for generating a task execution table to notify a user when the first automatic processing instruction or the second automatic processing instruction is executed.
According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.
According to the database table processing method, the database table processing device, the electronic equipment and the computer readable medium, a first table in a first database and a second table in a second database are obtained; comparing the data structures of the first table and the second table through a database statement to generate a comparison result; generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and determining the mode of executing the first automatic processing instruction or the second automatic processing instruction according to a preset strategy, rapidly comparing tables in different databases, positioning the difference items, and automatically revising the difference items, so that the consistency and the accuracy of data among the databases can be ensured, and the safety problem of the databases caused by misoperation of common tables among the databases is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
Fig. 1 is a system block diagram illustrating a database table processing method and apparatus according to an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a database table processing method in accordance with an exemplary embodiment.
FIG. 3 is a flow chart illustrating a database table processing method according to another exemplary embodiment.
Fig. 4 is a block diagram illustrating a database table processing apparatus according to an example embodiment.
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 6 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
Fig. 1 is a system block diagram illustrating a database table processing method and apparatus according to an exemplary embodiment.
As shown in fig. 1, the system architecture 10 may include business servers 101, 102, 103, a network 104, and a processing server 105. The network 104 serves to provide a medium for communication links between the service servers 101, 102, 103 and the processing server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Users may use the service servers 101, 102, 103 to interact with the processing server 105 over the network 104 to receive or transmit data or the like. The business servers 101, 102, 103 may have various communication client applications installed thereon, such as a financial services application, a shopping application, a web browser application, an instant messaging tool, a mailbox client, social platform software, and the like.
The business servers 101, 102, 103 can be various electronic devices with data processing capabilities including, but not limited to, desktop servers, distributed server systems, laptop portable computers, desktop computers, and the like. The service servers 101, 102, 103 may also communicate data tables between themselves via the network 104.
The processing server 105 may be a server that provides various services, such as a server that manages data tables between the business servers 101, 102, 103. The processing server 105 can compare the data table structures among the business servers 101, 102, 103 and can automatically process according to a preset policy when there is a difference between tables, and feed back the processing result (e.g., table processing result, table change command, etc.) to the administrator.
The processing server 105 may, for example, obtain a first table in a first database and a second table in a second database; the processing server 105 may compare the data structures of the first table and the second table, for example, by a database statement to generate a comparison result; the processing server 105 may generate a first automatic processing instruction and a second automatic processing instruction, for example, according to the comparison result; the processing server 105 may determine to execute the first automated processing instruction or the second automated processing instruction, for example, according to a preset policy.
The processing server 105 may be a server of one entity, or may be composed of a plurality of servers, for example, and a part of the processing server 105 may be used for acquiring a first table in a first database and a second table in a second database, for example; comparing the data structures of the first table and the second table through a database statement to generate a comparison result; and a portion of the processing server 105 may also be used, for example, to generate a first automated processing instruction and a second automated processing instruction based on the comparison; and determining to execute the first automatic processing instruction or the second automatic processing instruction according to a preset strategy.
It should be noted that the database table processing method provided by the embodiment of the present disclosure may be executed by the processing server 105, and accordingly, the database table processing apparatus may be disposed in the processing server 105.
FIG. 2 is a flow diagram illustrating a database table processing method in accordance with an exemplary embodiment. The database table processing method 20 includes at least steps S202 to S208.
As shown in fig. 2, in S202, a first table in a first database and a second table in a second database are acquired. The method comprises the following steps: determining the first database and the second database according to a user instruction; determining a target table name; and searching the first database and the second database based on the target table to obtain the first table and the second table.
More specifically, an application interface for a user to select and input parameters may be generated, and the user may see names of all servers with control authority on the application interface, which may specifically include a business server, a development server, a product server, a test server, and the like, and in each server, the server may be distinguished by a number, which may be, for example, the development server 1, the development server 2, and the like.
The user can select two servers to be compared on the interface, such as a development server and a test server, after the two servers are selected, the application interface is connected with the two servers, all database table files in the two servers are read out and displayed on the user interface, and the user can directly perform subsequent operation to select the two database tables to be compared.
Generally, the table names of the two tables to be compared are the same, and for example, if the user selects the a table in the first database, the application interface automatically searches the same a table in the second server for presentation.
In one embodiment, determining the target table name comprises: and determining the name of the target table according to preset parameters. Wherein, the preset parameters may include: presetting a time range, and determining a target table name according to preset parameters, wherein the method comprises the following steps: and acquiring the table modified within the preset time range as a target table.
The user can also perform table search on the application interface through parameter setting assistance, and for example, a time range is set, such as the time range is 24 hours, and all database tables which are changed in 24 hours and the like can be automatically searched in the first database and the second database for the user to select.
In S204, the data structures of the first table and the second table are compared by a database statement to generate a comparison result. The method comprises the following steps: acquiring field names in the first table and the second table item by item through database statements; and comparing the field names in the first table and the second table to generate the comparison result.
More specifically, the data structure of the database table may be obtained, for example, by a SELECT command in an SQL statement. More specifically, the SELECT command may obtain the following information: the table name, table description, field serial number, field name, identification, main key, type, occupied byte number, length, decimal digit and the like can be compared one by one to determine the comparison result of the first table and the second table.
In S206, a first automatic processing instruction and a second automatic processing instruction are generated according to the comparison result. The first automatic processing instruction may be, for example, a drop instruction, and the second automatic processing instruction may be, for example, a change, add, or the like.
Wherein add, alter, drop are DDL statements, insert, update, delete are DML statements, DDL statements are modifications to a table structure, and DML statements are modifications to table data. Wherein, by using the DROP statement, the index, table, and database can be deleted; change can be used in the alter statement to modify field properties and also for field renaming.
In S208, it is determined to execute the first automatic processing instruction or the second automatic processing instruction according to a preset policy. The method comprises the following steps: and comparing the attributes of the first database and the attributes of the second database with the preset strategy to determine to execute a first automatic processing instruction or a second automatic processing instruction.
The preset policy may be set by experience, and the preset policy may set under which condition the first automatic processing instruction is performed and under which condition the second automatic processing instruction is performed. The preset strategy can also set under which condition a part of the first automatic processing instructions are executed and under which condition a part of the second automatic processing instructions are executed. It is worth mentioning that this policy is configured by the developer, whereby it is possible to select which translation statements to execute and which translation statements not to execute, depending on the direction of the policy. For example, the policy may allow only the addition of columns for certain attributes, or allow the change of attributes for certain tables, etc., and if the policy does not allow, no conversion is performed.
For a specific description, please refer to the embodiment corresponding to fig. 3.
In one embodiment, may include: processing a first table in a first database through a first automatic processing instruction; or processing a second table in a second database via a second automatic processing instruction.
Further comprising: and generating a task execution table to inform a user when the first automatic processing instruction or the second automatic processing instruction is executed.
According to the database table processing method, a first table in a first database and a second table in a second database are obtained; comparing the data structures of the first table and the second table through a database statement to generate a comparison result; generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and determining the mode of executing the first automatic processing instruction or the second automatic processing instruction according to a preset strategy, rapidly comparing tables in different databases, positioning the difference items, and automatically revising the difference items, so that the consistency and the accuracy of data among the databases can be ensured, and the safety problem of the databases caused by misoperation of common tables among the databases is reduced.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
FIG. 3 is a flow chart illustrating a database table processing method according to another exemplary embodiment. The flow shown in fig. 3 is a detailed description of "determining to execute the first automatic processing instruction or the second automatic processing instruction according to the preset policy" at S208 in the flow shown in fig. 2.
As shown in fig. 3, in S302, a first automatic processing instruction and a second automatic processing instruction are generated according to the comparison result. When the first database is compared with the second database and then the second database is modified, the second database can be considered as forward modification and is modified through a second automatic processing instruction; when a comparison is made between the first database and the second database and then the first database is modified, it may be considered as a reverse modification, modified by the first automated processing instruction. Whether it is the forward or reverse processing may be done according to a preset strategy or user selection yes or no.
In S304, when the first database is a development database and the second database is a production database, it is determined to execute a first automatic processing instruction.
In S306, a first table in the first database is processed by a first automatic processing instruction. When the data table structures of the development library and the production library are compared, the modification of the data structure of the table in the production library needs to be very careful because the production library relates to the content at the practical application level, so that after the A table in the development library is modified and compared with the production library, some content may be found to be that the A table is not allowed to be added or modified, and the content of the A library can be modified in a 'reverse' manner, and more specifically, the content of the A library can be modified in a reverse manner through a drop statement.
In S308, when the first database is a development database and the second database is a test database, it is determined to execute a second automatic processing instruction.
In S310, the second table in the second database is processed by the second automatic processing instruction. When the data table structures of the development library and the test library are compared, the purpose of the test library is to accurately test the contents in the development library in real time, and the tables in the test library are lower in the unchangeable modification level, so that the data table structures in the test library are completely consistent with the tables in the development library. At this time, the forward processing instruction, that is, the second automatic processing instruction, needs to be executed, and the compared inconsistent data structure content is completely modified for the table in the second database.
It is worth mentioning that in the process of actually performing the first automatic processing instruction and the second automatic processing instruction, what lines are specifically modified can be configured according to a specific policy
In a particular embodiment, it can be understood that: the forward instruction may be executed directly when the first database is a development library and the second database is a test library (because the second database is for testing the contents in the first database, it is sufficient that the second database is consistent with the table of the first database in real time).
When the first database is a development database and the second database is a production database, the reverse instruction can be directly executed (because the security level of the second database is higher, the second database is basically not allowed to be changed, and the first database needs to be consistent with the table of the second database).
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 4 is a block diagram illustrating a database table processing apparatus according to an example embodiment. As shown in fig. 4, the database table processing apparatus 40 includes: a table module 402, a comparison module 404, an instruction module 406, an execution module 408, and a notification module 410.
The table module 402 is configured to obtain a first table in a first database and a second table in a second database; the table module 402 includes: the database unit is used for determining the first database and the second database according to a user instruction; the table module 402 includes: a name unit for determining a target table name; the name unit is further used for determining the name of the target table according to preset parameters. The preset parameters include: the name unit is also used for acquiring the table modified in the preset time range to serve as a target table. The table module 402 includes: a table unit, configured to search the first database and the second database based on the target table to obtain the first table and the second table.
The comparison module 404 is configured to compare the data structures of the first table and the second table through a database statement to generate a comparison result; the comparison module 404 includes: the acquisition unit is used for acquiring field names in the first table and the second table one by one through database statements; and the comparison unit is used for comparing the field names in the first table and the second table to generate the comparison result.
The instruction module 406 is configured to generate a first automatic processing instruction and a second automatic processing instruction according to the comparison result.
The execution module 408 is configured to determine to execute the first automatic processing instruction or the second automatic processing instruction according to a preset policy. The execution module 408 is further configured to process the first table in the first database through the first automatic processing instruction; or processing a second table in a second database via a second automatic processing instruction. The execution module 408 includes: and the judging unit is used for comparing the attribute of the first database and the attribute of the second database with the preset strategy so as to determine to execute the first automatic processing instruction or the second automatic processing instruction. The judging unit includes: and the first execution subunit is used for determining to execute a first automatic processing instruction when the first database is a development database and the second database is a production database. The judging unit includes: and the second execution subunit determines to execute a second automatic processing instruction when the first database is a development database and the second database is a test database.
The notification module 410 is configured to generate a task execution table to notify a user when the first automatic processing instruction or the second automatic processing instruction is executed.
According to the database table processing device disclosed by the invention, a first table in a first database and a second table in a second database are obtained; comparing the data structures of the first table and the second table through a database statement to generate a comparison result; generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and determining the mode of executing the first automatic processing instruction or the second automatic processing instruction according to a preset strategy, rapidly comparing tables in different databases, positioning the difference items, and automatically revising the difference items, so that the consistency and the accuracy of data among the databases can be ensured, and the safety problem of the databases caused by misoperation of common tables among the databases is reduced.
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 500 according to this embodiment of the disclosure is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one memory unit 520, a bus 530 that couples various system components including the memory unit 520 and the processing unit 510, a display unit 540, and the like.
Wherein the storage unit stores program code executable by the processing unit 510 to cause the processing unit 510 to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 510 may perform the steps as shown in fig. 2, fig. 3.
The memory unit 520 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)5201 and/or a cache memory unit 5202, and may further include a read only memory unit (ROM) 5203.
The memory unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 500' (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 550. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. The network adapter 560 may communicate with other modules of the electronic device 500 via the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 6, the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present disclosure.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: acquiring a first table in a first database and a second table in a second database; comparing the data structures of the first table and the second table through a database statement to generate a comparison result; generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and determining to execute the first automatic processing instruction or the second automatic processing instruction according to a preset strategy.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A database table processing method, comprising:
acquiring a first table in a first database and a second table in a second database;
comparing the data structures of the first table and the second table through a database statement to generate a comparison result;
generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and
and determining to execute the first automatic processing instruction or the second automatic processing instruction according to a preset strategy.
2. The method of claim 1, wherein obtaining a first table in a first database and a second table in a second database comprises:
determining the first database and the second database according to a user instruction;
determining a target table name; and
searching the first database and the second database based on the target table to obtain the first table and the second table.
3. The method of any of claims 1-2, wherein determining a target table name comprises:
and determining the name of the target table according to preset parameters.
4. The method of any of claims 1-3, wherein the preset parameters comprise: the time range is preset, and the time range is preset,
determining the name of a target table according to preset parameters, wherein the method comprises the following steps:
and acquiring the table modified within the preset time range as a target table.
5. The method of any of claims 1-4, wherein comparing the data structures of the first table and the second table by a database statement generates a comparison result, comprising:
acquiring field names in the first table and the second table item by item through database statements; and
comparing the field names in the first table and the second table to generate the comparison result.
6. The method of any of claims 1-5, wherein determining to execute the first automated processing instruction or the second automated processing instruction according to a predetermined policy comprises:
and comparing the attributes of the first database and the attributes of the second database with the preset strategy to determine to execute a first automatic processing instruction or a second automatic processing instruction.
7. The method of any of claims 1-6, wherein comparing the attributes of the first database and the attributes of the second database to the preset policy to determine whether to execute a first automated processing instruction or a second automated processing instruction comprises:
and when the first database is a development database and the second database is a production database, determining to execute a first automatic processing instruction.
8. A database table processing apparatus, comprising:
the table module is used for acquiring a first table in a first database and a second table in a second database;
the comparison module is used for comparing the data structures of the first table and the second table through database statements to generate a comparison result;
the instruction module is used for generating a first automatic processing instruction and a second automatic processing instruction according to the comparison result; and
and the execution module is used for determining to execute the first automatic processing instruction or the second automatic processing instruction according to a preset strategy.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201911408742.7A 2019-12-31 2019-12-31 Database table processing method and device and electronic equipment Pending CN111190905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911408742.7A CN111190905A (en) 2019-12-31 2019-12-31 Database table processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911408742.7A CN111190905A (en) 2019-12-31 2019-12-31 Database table processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111190905A true CN111190905A (en) 2020-05-22

Family

ID=70709683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911408742.7A Pending CN111190905A (en) 2019-12-31 2019-12-31 Database table processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111190905A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711573A (en) * 2021-01-15 2021-04-27 中化石化销售有限公司 Database structure difference report generation method and device
CN113138933A (en) * 2021-05-13 2021-07-20 网易(杭州)网络有限公司 Data table testing method, electronic device and storage medium
CN113722326A (en) * 2021-09-01 2021-11-30 北京火山引擎科技有限公司 Data processing method and device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085380A1 (en) * 2004-10-19 2006-04-20 Microsoft Corporation Reentrant database object wizard
US20130117232A1 (en) * 2011-11-09 2013-05-09 Microsoft Corporation Snapshots of database models
US20150293952A1 (en) * 2014-04-11 2015-10-15 Bank Of America Corporation Method for tracking differences between production and development databases to perform an automatic synchronization
US20160042048A1 (en) * 2014-08-07 2016-02-11 Bank Of America Corporation Denormalize recursive, unbalanced, & ragged hierarchies
CN109002472A (en) * 2018-06-13 2018-12-14 平安科技(深圳)有限公司 A kind of recognition methods of database difference and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085380A1 (en) * 2004-10-19 2006-04-20 Microsoft Corporation Reentrant database object wizard
US20130117232A1 (en) * 2011-11-09 2013-05-09 Microsoft Corporation Snapshots of database models
US20150293952A1 (en) * 2014-04-11 2015-10-15 Bank Of America Corporation Method for tracking differences between production and development databases to perform an automatic synchronization
US20160042048A1 (en) * 2014-08-07 2016-02-11 Bank Of America Corporation Denormalize recursive, unbalanced, & ragged hierarchies
CN109002472A (en) * 2018-06-13 2018-12-14 平安科技(深圳)有限公司 A kind of recognition methods of database difference and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112711573A (en) * 2021-01-15 2021-04-27 中化石化销售有限公司 Database structure difference report generation method and device
CN113138933A (en) * 2021-05-13 2021-07-20 网易(杭州)网络有限公司 Data table testing method, electronic device and storage medium
CN113722326A (en) * 2021-09-01 2021-11-30 北京火山引擎科技有限公司 Data processing method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US20200265103A1 (en) Systems and methods for issue tracking systems
US8601438B2 (en) Data transformation based on a technical design document
US11886454B2 (en) Systems and methods for storing and accessing database queries
CN111177231A (en) Report generation method and report generation device
US11928463B2 (en) Auto mapping recommender
US10977011B2 (en) Structured development for web application frameworks
AU2017265144B2 (en) Information retrieval
CN111190905A (en) Database table processing method and device and electronic equipment
CN110674117A (en) Data modeling method and device, computer readable medium and electronic equipment
US20180293160A1 (en) Comparing software projects having been analyzed using different criteria
CN111125064A (en) Method and device for generating database mode definition statement
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
CN109460363B (en) Automatic testing method and device, electronic equipment and computer readable medium
US11487708B1 (en) Interactive visual data preparation service
CN110780970A (en) Data screening method, device, equipment and computer readable storage medium
US9338062B2 (en) Information displaying method and apparatus
CN115543428A (en) Simulated data generation method and device based on strategy template
US11275729B2 (en) Template search system and template search method
CN117940890A (en) Collaborative industrial integrated development and execution environment
CN109697141B (en) Method and device for visual testing
AU2014101164A4 (en) Information displaying method and apparatus
CN113742321A (en) Data updating method and device
CN111221610A (en) Page element acquisition method and device
CN113515504B (en) Data management method, device, electronic equipment and storage medium
US12099531B2 (en) Information retrieval

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200522

WD01 Invention patent application deemed withdrawn after publication