CN114328552A - Database management method, system and computer readable medium - Google Patents

Database management method, system and computer readable medium Download PDF

Info

Publication number
CN114328552A
CN114328552A CN202111624577.6A CN202111624577A CN114328552A CN 114328552 A CN114328552 A CN 114328552A CN 202111624577 A CN202111624577 A CN 202111624577A CN 114328552 A CN114328552 A CN 114328552A
Authority
CN
China
Prior art keywords
database
management
field information
management file
moment
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
CN202111624577.6A
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.)
Shopex Software Co ltd
Original Assignee
Shopex Software 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 Shopex Software Co ltd filed Critical Shopex Software Co ltd
Priority to CN202111624577.6A priority Critical patent/CN114328552A/en
Publication of CN114328552A publication Critical patent/CN114328552A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a database management method, a database management system and a computer readable medium. The method comprises the following steps: acquiring one or more database tables in a database at a first moment, and mapping each database table into a management file; generating an operation interface according to each management file, wherein the operation interface is provided with an operation table generated according to the table name and the field information of the management file; receiving the function operation executed on the operation table through the operation interface before the second moment, and triggering the change of the field information in the management file according to the function operation; carrying out differential comparison on the database table at the first moment and the management file at the second moment, and generating one or more sql updating sentences according to the comparison result; one or more database tables in the database are updated according to the one or more sql update statements. The management file mapped by the database table is modified through the operation interface, so that the database is updated, and the management mode is simple and convenient.

Description

Database management method, system and computer readable medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and system for managing a database, and a computer readable medium.
Background
As business needs change, the database table structure may change, or the table data of some database tables may change. In order to keep the changed database tables consistent with the database tables in the database, the database needs to be updated. In the traditional database updating process, the operation of creating, modifying, deleting and the like of a database table needs a developer to hand-write an sql statement, or the operation is managed through a third party sql tool, the management of the statement needing to be updated each time is inconvenient, and the management of a historical version and the operation of a source are troublesome. Moreover, the manual operation is also easy to cause database operation errors, for example, data is deleted by mistake, which causes significant loss.
Therefore, a need exists for a simple and easy-to-use database management method, system, and computer readable medium.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method, a system and a computer readable medium for managing a database, which solve the problem of complex database management steps.
In order to solve the above technical problem, the present invention provides a method for managing a database, which is suitable for updating a database table in the database in time through a database management plug-in, and comprises the following steps: acquiring one or more database tables in the database at a first moment, and mapping each database table into a management file, wherein the management file has a preset data exchange format and comprises a table name and field information of the database table corresponding to the management file; generating an operation interface according to each management file, wherein the operation interface is provided with an operation table generated according to the table name and the field information of the management file; receiving a function operation executed on the operation table through the operation interface before a second moment, and triggering the change of the field information in the management file according to the function operation, wherein the second moment is a moment after the first moment; upgrading the version of the database management plug-in at the second moment, simultaneously carrying out differential comparison on the field information in the one or more database tables acquired at the first moment and the field information in the one or more management files corresponding to the one or more database tables at the second moment, and if the difference exists, generating one or more sql updating sentences through the database management plug-in according to the result of the differential comparison; and updating, by the database management plugin, the one or more database tables in the database according to the one or more sql update statements.
In an embodiment of the present invention, the field information includes field name information, field type information, field description information, whether to encrypt information, and/or whether to index query item information.
In an embodiment of the present invention, the field information further includes association information, and the association information includes information on whether any management file refers to other management files.
In an embodiment of the present invention, the function operation includes a function operation of creating, modifying, deleting and/or exposing the operation table.
In an embodiment of the present invention, configuring a sql version number corresponding to the version of the current database management plugin in the one or more sql update statements.
In an embodiment of the present invention, before the database table is updated according to the sql update statement by the database management plugin, checking whether one or more sql update statements have a defect, if so, adjusting the sql update statement, and updating the database table according to the adjusted sql update statement.
In an embodiment of the present invention, the method further includes generating a corresponding api interface document according to the one or more management files, where the api interface document includes a name of the api, a request parameter, and/or a return parameter.
In an embodiment of the present invention, the predetermined data exchange format includes a yaml, json, or xml format.
In order to solve the above technical problem, the present invention provides a database management system, including: the database table mapping module is configured to acquire one or more database tables in the database at a first moment and map each database table into a management file, wherein the management file has a preset data exchange format and comprises a table name and field information of the database table corresponding to the management file; the operation interface management module is configured to generate an operation interface according to each management file, the operation interface is provided with an operation table generated according to the table name and the field information of the management file, and the operation interface management module is further configured to receive function operation executed on the operation table through the operation interface before a second moment and trigger the change of the field information in the management file according to the function operation; the upgrade update execution module is configured to upgrade the version of the database management plugin at the second time, compare field information in the one or more database tables acquired at the first time with field information in the one or more management files corresponding to the one or more database tables at the second time in a differentiated manner, if a difference exists, generate one or more sql update statements according to a result of the differential comparison by the database management plugin, and update the one or more database tables in the database according to the one or more sql update statements by the database management plugin.
In an embodiment of the present invention, the upgrade update execution module is further configured to configure, in the one or more sql update statements, an sql version number corresponding to a version of the current database management plugin.
In order to solve the above technical problem, the present invention provides a database management system, including: a memory for storing instructions executable by the processor; and a processor for executing the instructions to implement the database management method as described above.
To solve the above technical problem, the present invention provides a computer-readable medium storing computer program code, which when executed by a processor implements the method of managing a database as described above.
Compared with the prior art, the invention has the following advantages:
according to the database management method, the database table is mapped into the management file, the operation interface is generated according to the management file, the management file can be modified and the database can be updated through the operation interface, the management mode is simple and convenient, and the interaction is more friendly; the invention configures the corresponding version number in the sql update statement, thereby facilitating the systematic management of the sql update statement and the operation tracing of the database.
Drawings
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below, wherein:
FIG. 1 is an exemplary flow chart of a method of managing a database according to an embodiment of the present invention;
FIG. 2 is a system block diagram of a database management system according to an embodiment of the present invention;
fig. 3 is a system block diagram of a management system of a database according to another embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only examples or embodiments of the application, from which the application can also be applied to other similar scenarios without inventive effort for a person skilled in the art. Unless otherwise apparent from the context, or otherwise indicated, like reference numbers in the figures refer to the same structure or operation.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description. Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate. In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
It should be noted that the terms "first", "second", and the like are used to define the components, and are only used for convenience of distinguishing the corresponding components, and the terms have no special meanings unless otherwise stated, and therefore, the scope of protection of the present application is not to be construed as being limited. Further, although the terms used in the present application are selected from publicly known and used terms, some of the terms mentioned in the specification of the present application may be selected by the applicant at his or her discretion, the detailed meanings of which are described in relevant parts of the description herein. Further, it is required that the present application is understood not only by the actual terms used but also by the meaning of each term lying within.
It will be understood that when an element is referred to as being "on," "connected to," "coupled to" or "contacting" another element, it can be directly on, connected or coupled to, or contacting the other element or intervening elements may be present. In contrast, when an element is referred to as being "directly on," "directly connected to," "directly coupled to" or "directly contacting" another element, there are no intervening elements present. Similarly, when a first component is said to be "in electrical contact with" or "electrically coupled to" a second component, there is an electrical path between the first component and the second component that allows current to flow. The electrical path may include capacitors, coupled inductors, and/or other components that allow current to flow even without direct contact between the conductive components.
Flow charts are used herein to illustrate operations performed by systems according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, various steps may be processed in reverse order or simultaneously. Meanwhile, other operations are added to or removed from these processes.
The invention comprises a management method of a database, which is suitable for updating the database table in the database in time through a database management plug-in. Fig. 1 is an exemplary flowchart of a database management method 10 (hereinafter referred to as "management method 10") according to an embodiment of the present invention. As shown in fig. 1, the database management method 10 of the present embodiment includes the following steps.
Step S11 is to obtain one or more database tables in the database at the first time, and map each database table into a management file, where the management file has a preset data exchange format, and the management file includes a table name and field information of the database table corresponding to the management file.
Step S12 is to generate an operation interface for each management file, the operation interface having an operation table generated based on the table name and field information of the management file.
Step S13 is to receive the function operation executed on the operation table through the operation interface before the second time, and trigger the change of the field information in the management file according to the function operation, where the second time is a time after the first time.
Step S14 is to upgrade the version of the database management plugin at the second time, and at the same time, compare the field information in the one or more database tables obtained at the first time with the field information in the one or more management files corresponding to the one or more database tables at the second time in a differentiated manner, and if there is a difference, generate one or more sql update statements according to the result of the differentiated comparison by the database management plugin.
Step S15 is updating one or more database tables in the database according to one or more sql update statements via the database management plugin.
The above steps S11-S15 are explained in detail below.
In step S11, a database typically includes one or more database tables, each having a unique table name, the contents of each database table including rows of records with data, the columns of each row of data being formed by field information. One or more database tables in a database are obtained at a first time. And mapping each obtained database table into a management file, wherein the management file has a preset data exchange format. In some embodiments, the predetermined data exchange format comprises a yaml, json, or xml format.
Illustratively, assume that the preset data exchange format of the management file is json. json is a lightweight text data interchange format that uses Javascript syntax to describe data objects, is self-descriptive and easy to understand. The specific way of mapping each obtained database table into a management file may be to write field information of the database table according to a json text data exchange format, so as to obtain the management file mapped by the database table.
Obviously, the management file includes the table name and field information of the database table corresponding to the management file. In some embodiments, the field information includes field name information, field type information, field description information, whether to encrypt information, and/or whether to index query term information. For example, the field information in the order database table includes an article ID number, article description, seller name, buyer name, order number, and the like. The data type of the commodity ID number is a numerical type, the field length is 8 bits, and the commodity ID number is an index query item, which indicates that an order can be queried according to the commodity ID number. And the field information also includes whether sensitive data is encrypted. The buyer name may be encrypted, for example, to protect the buyer's private information.
In some embodiments, the field information further includes association information including information whether any one management file refers to other management files. Illustratively, the field information in the order database table may also include association information, which may be information that the name of the buyer references the member database table. Specifically, the field information in the order database table includes a buyer name, the buyer name can be used as a foreign key of the member database table, and in the member database table, the buyer name can be used as a primary key of the member database table, so that the order database table and the member database table can be associated through the buyer name, and after the association is completed, the interface display automatically refers to the member information in the order list. The database table may be associated with one database table, or may be associated with a plurality of database tables, which is not limited in this application.
In step S12, an operation interface is generated from each management file, the operation interface having an operation table generated from the table name and field information of the management file. Specifically, the operation interface includes an operation table, and a header of the operation table and contents of the table are generated from a table name and field information of the management file. The field information of the management file defines whether the content item of the table is read-only, searchable, filling-up necessary, editable, and references to other management files. Thus, the content items of the operation table may be a series of form contents such as an input box, a drop-down box, a picture, a file, a radio button, a time component, and the like. The operation table not only can show real-time data of the database table, but also can change the management file by creating, modifying, deleting, referring to other management files and the like on the content item of the operation table.
In step S13, the function operation performed on the operation table is received through the operation interface before a second time, and the change of the field information in the management file is triggered according to the function operation, where the second time is a time after the first time. The operation interface is generated from the management file, and has an operation table generated from the table name and the field information of the management file. The field information in the operation table and the field information in the management file are in bidirectional synchronization, and when the field information in the operation table is changed, the field information in the management file is triggered to be changed synchronously. Similarly, triggering the change of the field information in the management file also triggers the synchronous change of the field information in the operation table. In some embodiments, the function operation includes a function operation of creating, modifying, deleting and/or exposing an operation table, which is not limited in this application.
In step S14, the version of the database management plugin is upgraded at the second time, and the field information in the one or more database tables acquired at the first time is differentiated and compared with the field information in the one or more management files corresponding to the one or more database tables at the second time, and if there is a difference, one or more sql update statements are generated by the database management plugin according to the result of the differentiation and comparison.
In practical application, according to the change of business requirements, the application needs to be continuously updated in version iteration, and correspondingly, the database called by the application also needs to be updated correspondingly. The second time may be a time when the database needs to be upgraded, but the application is not limited thereto. And at the second moment, carrying out differential comparison on the field information in the one or more database tables acquired at the first moment and the field information in the one or more management files corresponding to the one or more database tables at the second moment. The field information in one or more database tables acquired at the first moment is the functional operation which is not created, modified, deleted and/or displayed through the operation interface. If the field information in one or more management files corresponding to one or more database tables at the second moment is subjected to the functional operation of creating, modifying, deleting and/or displaying through an operation interface, the field information and the field information are different, and the database management plug-in generates one or more sql updating statements according to the result of the difference comparison; if the field information in the one or more management files corresponding to the one or more database tables at the second moment is not subjected to the functional operation of creating, modifying, deleting and/or displaying through the operation interface, the difference does not exist between the field information and the field information, and the database management plug-in does not generate the sql update statement according to the result of the difference comparison.
In the scheme of the invention, through the configuration, the information in one or more data tables in the database is mapped into the management file and the operation interface is further generated, so that a user can conveniently perform various functional operations on the information in the data tables in the operation interface. According to the scheme, special moments are set, such as the first moment and the second moment, and between the first moment and the second moment, a user can edit and modify the operation table at will, wherein the operations can generate some temporary field information changes, and exemplarily, some sql statements in the middle process can also be generated. During the first time and the second time, the user performs function operations through the operation table, and the operations only affect the field information in the management file but do not affect the field information in the database. In particular, there may be some corresponding forward operations and reverse operations in these functional operations, such as adding information to a certain field and then deleting it, and the final result is that the data in the database is not required to be updated, but according to the prior art, information needs to be updated for each time of adding information to a field and for each time of deleting information, which increases the burden on the throughput of the database and also increases the probability of errors. After the scheme of the invention is adopted, the database is updated only at the time of the change of the version of the database management plug-in at a special moment in stages, so that the problem in the prior art is effectively solved.
In some embodiments, configuring the sql version number corresponding to the version of the current database management plugin in one or more sql update statements is further included. The sql version number corresponding to the version of the current database management plugin can be configured in the first row of one or more sql update statements, or the sql version number corresponding to the version of the current database management plugin can be configured in the last row of one or more sql update statements. Therefore, the updating statement of the data table has gradual version management, and convenience is provided for the operation traceability of the database.
In step S15, one or more database tables in the database are updated by the database management plug-in according to the one or more sql update statements. When the database tables needing to be updated are few, the database management plug-in can update one or more database tables in the database one by one according to the sql update statement in a serial update mode; when a plurality of database tables need to be updated or a plurality of record rows need to be updated in each database table, the database management plug-in may update one or more database tables in the database in parallel according to the sql update statement in a parallel update manner, which is not limited in this application.
In some embodiments, before updating the database table according to the sql update statement by the database management plugin, the method further includes checking whether one or more sql update statements have defects, if so, adjusting the sql update statement, and updating the database table according to the adjusted sql update statement. The sql update statement generated by the database management plug-in may have grammatical or logical defects, before the database table is updated according to the sql update statement by the database management plug-in, whether one or more sql update statements have defects is checked, if so, the sql update statement is adjusted, and the database table is updated according to the adjusted sql update statement. The database can not be updated by mistake, and the safety of the database is ensured.
In some embodiments, the method further includes generating a corresponding api interface document from the one or more management files, the api interface document including a name of the api, request parameters, and/or return parameters. The names, request parameters and/or return parameters of the api of the traditional api interface document are manually written by developers, and when the field information content of a database table is more, errors are easily written. The method and the device automatically generate the corresponding name, request parameter and/or return parameter of the api through the table name and field information of the management file, thereby improving the correctness of the api interface document.
According to the database management method, the database table is mapped into the management file, the operation interface is generated according to the management file, the management file can be modified and the database can be updated through the operation interface, the management mode is simple and convenient, and the interaction is more friendly; the invention configures the corresponding version number in the sql update statement, thereby facilitating the systematic management of the sql update statement and the operation tracing of the database. Particularly, the invention leads the updating of the data table in the database to follow the version updating of the adopted database management plug-in unit and has staged database updating, thereby enhancing the stability and the safety of the data in the database, simultaneously, the version number is added to the changed sql updating statement, the flow of the database updating is normalized, and the updating history of the database can be perfectly recorded.
The invention also comprises a management system of the database. The system may be used to perform the foregoing database management method. Therefore, the above detailed description of the database management method can be used to describe the database management system of the present invention, and the same contents will not be expanded. Fig. 2 is a system block diagram of a management system of a database according to an embodiment of the present invention. As shown in fig. 2, the management system 20 of the database of the present embodiment mainly includes a database table mapping module 21, an operation interface management module 22, and an upgrade update execution module 22.
The database table mapping module 21 is configured to obtain one or more database tables in the database at a first time, and map each database table into a management file, where the management file has a preset data exchange format, and the management file includes a table name and field information of the database table corresponding to the management file.
The operation interface management module 22 is configured to generate an operation interface according to each management file, the operation interface has an operation table generated according to the table name and the field information of the management file, and the operation interface management module is further configured to receive the function operation performed on the operation table through the operation interface before the second time, and trigger the change of the field information in the management file according to the function operation.
In some embodiments, the operator interface management module 22 is further configured to generate an api interface document from each management file, the api interface document including the name of the api, request parameters, and/or return parameters.
The upgrade update execution module 23 is configured to upgrade the version of the database management plugin at the second time, and at the same time, differentiate and compare the field information in the one or more database tables acquired at the first time with the field information in the one or more management files corresponding to the one or more database tables at the second time, and if there is a difference, generate one or more sql update statements according to a result of the differentiation and comparison by the database management plugin.
The upgrade update execution module 23 is further configured to update, via the database management plug-in, one or more database tables in the database according to the one or more sql update statements. In some embodiments, before updating the database table according to the sql update statement by the database management plugin, the method further includes checking whether one or more sql update statements have defects, if so, adjusting the sql update statement, and updating the database table according to the adjusted sql update statement.
In some embodiments, the upgrade update execution module 23 is further configured to configure a sql version number corresponding to the version of the current database management plug-in for one or more sql update statements.
The database management system maps the database table into the management file through the database table mapping module, generates the operation interface according to the management file through the operation interface management module, and can uniformly modify the field information in the management file through the operation interface, thereby avoiding repeated coding of developers, providing the operation interface for the system, and ensuring that the interaction mode is more friendly; the sql update execution module automatically generates the sql update statement, and the database is updated through the sql update statement, so that the error rate of manually writing the sql update statement is reduced, and the security of the database is improved.
The invention also includes a combined database management system comprising: a memory for storing instructions executable by the processor; and a processor for executing the instructions to implement the database management method as described above.
Fig. 3 is a system block diagram of a management system of a database according to another embodiment of the present invention. Referring to fig. 3, the operating device 300 may include an internal communication bus 301, a processor 302, a Read Only Memory (ROM)303, a Random Access Memory (RAM)304, and a communication port 305. When used on a personal computer, the operating device 300 may also include a hard disk 306. An internal communication bus 301 may enable data communication between the components of the operating device 300. Processor 302 may make the determination and issue a prompt. In some embodiments, processor 302 may be comprised of one or more processors. The communication port 305 can enable data communication between the operation device 300 and the outside. In some embodiments, the operator device 300 may send and receive information and data from a network through the communication port 305. The operating device 300 may also include various forms of program storage units and data storage units, such as a hard disk 306, Read Only Memory (ROM)303 and Random Access Memory (RAM)304, capable of storing various data files for computer processing and/or communication, as well as possible program instructions for execution by the processor 302. The processor executes these instructions to implement the main parts of the method. The results processed by the processor are communicated to the user device through the communication port and displayed on the user interface.
The above-mentioned database management method can be implemented as a computer program, stored in the hard disk 306, and loaded into the processor 302 for execution, so as to implement the database management method of the present application.
The invention also comprises a computer-readable medium having stored thereon computer program code which, when executed by a processor, implements the method of managing a database as described hereinbefore.
When the database management method is implemented as a computer program, it may be stored in a computer-readable storage medium as an article of manufacture. For example, computer-readable storage media can include but are not limited to magnetic storage devices (e.g., hard disk, floppy disk, magnetic strips), optical disks (e.g., Compact Disk (CD), Digital Versatile Disk (DVD)), smart cards, and flash memory devices (e.g., electrically Erasable Programmable Read Only Memory (EPROM), card, stick, key drive). In addition, various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" can include, without being limited to, wireless channels and various other media (and/or storage media) capable of storing, containing, and/or carrying code and/or instructions and/or data.
It should be understood that the above-described embodiments are illustrative only. The embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processor may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, and/or other electronic units designed to perform the functions described herein, or a combination thereof.
Aspects of the present application may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software. The above hardware or software may be referred to as "data block," module, "" engine, "" unit, "" component, "or" system. The processor may be one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), digital signal processing devices (DAPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or a combination thereof. Furthermore, aspects of the present application may be represented as a computer product, including computer readable program code, embodied in one or more computer readable media. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disk, floppy disk, magnetic strips … …), optical disks (e.g., Compact Disk (CD), Digital Versatile Disk (DVD) … …), smart cards, and flash memory devices (e.g., card, stick, key drive … …).
The computer readable medium may comprise a propagated data signal with the computer program code embodied therein, for example, on a baseband or as part of a carrier wave. The propagated signal may take any of a variety of forms, including electromagnetic, optical, and the like, or any suitable combination. The computer readable medium can be any computer readable medium that can communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device. Program code on a computer readable medium may be propagated over any suitable medium, including radio, electrical cable, fiber optic cable, radio frequency signals, or the like, or any combination of the preceding.
Having thus described the basic concept, it will be apparent to those skilled in the art that the foregoing disclosure is by way of example only, and is not intended to limit the present application. Various modifications, improvements and adaptations to the present application may occur to those skilled in the art, although not explicitly described herein. Such modifications, improvements and adaptations are proposed in the present application and thus fall within the spirit and scope of the exemplary embodiments of the present application.
Also, this application uses specific language to describe embodiments of the application. Reference throughout this specification to "one embodiment," "an embodiment," and/or "some embodiments" means that a particular feature, structure, or characteristic described in connection with at least one embodiment of the present application is included in at least one embodiment of the present application. Therefore, it is emphasized and should be appreciated that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, some features, structures, or characteristics of one or more embodiments of the present application may be combined as appropriate.
Similarly, it should be noted that in the preceding description of embodiments of the application, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure aiding in the understanding of one or more of the embodiments. This method of disclosure, however, is not intended to require more features than are expressly recited in the claims. Indeed, the embodiments may be characterized as having less than all of the features of a single embodiment disclosed above.
Although the present application has been described with reference to the present specific embodiments, it will be recognized by those skilled in the art that the foregoing embodiments are merely illustrative of the present application and that various changes and substitutions of equivalents may be made without departing from the spirit of the application, and therefore, it is intended that all changes and modifications to the above-described embodiments that come within the spirit of the application fall within the scope of the claims of the application.

Claims (12)

1. A management method of a database is suitable for updating database tables in the database in time through a database management plug-in, and is characterized by comprising the following steps:
acquiring one or more database tables in the database at a first moment, and mapping each database table into a management file, wherein the management file has a preset data exchange format and comprises a table name and field information of the database table corresponding to the management file;
generating an operation interface according to each management file, wherein the operation interface is provided with an operation table generated according to the table name and the field information of the management file;
receiving a function operation executed on the operation table through the operation interface before a second moment, and triggering the change of the field information in the management file according to the function operation, wherein the second moment is a moment after the first moment;
upgrading the version of the database management plug-in at the second moment, simultaneously carrying out differential comparison on the field information in the one or more database tables acquired at the first moment and the field information in the one or more management files corresponding to the one or more database tables at the second moment, and if the difference exists, generating one or more sql updating sentences through the database management plug-in according to the result of the differential comparison; and
updating, by the database management plugin, the one or more database tables in the database according to the one or more sql update statements.
2. The management method of claim 1, wherein the field information includes field name information, field type information, field description information, whether to encrypt information, and/or whether to index query item information.
3. The management method according to claim 1 or 2, wherein the field information further includes association information including information whether any management file refers to other management files.
4. A management method according to claim 1, wherein the function operation includes a function operation of creation, modification, deletion and/or presentation of the operation table.
5. The method of managing of claim 1 further comprising configuring the sql version number corresponding to the version of the current database management plug-in for the one or more sql update statements.
6. The management method according to claim 1 or 5, further comprising checking whether the one or more sql update statements have a defect before updating the database table according to the sql update statements by the database management plugin, adjusting the sql update statements if the defect exists, and updating the database table according to the adjusted sql update statements.
7. The management method according to claim 1, further comprising generating a corresponding api interface document from the one or more management files, the api interface document including a name of an api, a request argument, and/or a return argument.
8. The method of managing of claim 1, wherein the predetermined data exchange format comprises a yaml, json, or xml format.
9. A database management system, characterized in that,
the database table mapping module is configured to acquire one or more database tables in the database at a first moment and map each database table into a management file, wherein the management file has a preset data exchange format and comprises a table name and field information of the database table corresponding to the management file;
the operation interface management module is configured to generate an operation interface according to each management file, the operation interface is provided with an operation table generated according to the table name and the field information of the management file, and the operation interface management module is further configured to receive function operation executed on the operation table through the operation interface before a second moment and trigger the change of the field information in the management file according to the function operation;
the upgrade update execution module is configured to upgrade the version of the database management plugin at the second time, compare field information in the one or more database tables acquired at the first time with field information in the one or more management files corresponding to the one or more database tables at the second time in a differentiated manner, if a difference exists, generate one or more sql update statements according to a result of the differential comparison by the database management plugin, and update the one or more database tables in the database according to the one or more sql update statements by the database management plugin.
10. The management system of claim 9, wherein the upgrade update execution module is further configured to configure a sql version number corresponding to a version of a current database management plug-in for the one or more sql update statements.
11. A management system for a database, comprising:
a memory for storing instructions executable by the processor; and a processor for executing the instructions to implement the method of any one of claims 1-8.
12. A computer-readable medium having stored thereon computer program code which, when executed by a processor, implements the method of any of claims 1-8.
CN202111624577.6A 2021-12-28 2021-12-28 Database management method, system and computer readable medium Pending CN114328552A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111624577.6A CN114328552A (en) 2021-12-28 2021-12-28 Database management method, system and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111624577.6A CN114328552A (en) 2021-12-28 2021-12-28 Database management method, system and computer readable medium

Publications (1)

Publication Number Publication Date
CN114328552A true CN114328552A (en) 2022-04-12

Family

ID=81015172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111624577.6A Pending CN114328552A (en) 2021-12-28 2021-12-28 Database management method, system and computer readable medium

Country Status (1)

Country Link
CN (1) CN114328552A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312689A (en) * 2023-11-29 2023-12-29 山东阳光普众信息科技有限公司 Information management platform management analysis method and system, storage medium and intelligent terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117312689A (en) * 2023-11-29 2023-12-29 山东阳光普众信息科技有限公司 Information management platform management analysis method and system, storage medium and intelligent terminal
CN117312689B (en) * 2023-11-29 2024-02-02 山东阳光普众信息科技有限公司 Information management platform management analysis method and system, storage medium and intelligent terminal

Similar Documents

Publication Publication Date Title
US8887135B2 (en) Generating test cases for functional testing of a software application
JP7548673B2 (en) Generating Software Artifacts from Conceptual Data Models
US8805777B2 (en) Data record collapse and split functionality
CN111177113B (en) Data migration method, device, computer equipment and storage medium
US9195456B2 (en) Managing a catalog of scripts
US20220350447A1 (en) Editor for the creation and modification of data model metadata
WO2019071898A1 (en) Electronic device, database query script generation method and storage medium
WO2019000698A1 (en) Method and system for generating sql statement, electronic apparatus and readable storage medium
CN108763341B (en) Electronic device, automatic table building method and storage medium
CN114328552A (en) Database management method, system and computer readable medium
US10185757B2 (en) Non-uniform multi-row text file loading
US11556519B2 (en) Ensuring integrity of records in a not only structured query language database
WO2019085354A1 (en) Excel system interface-based database linkage method, electronic device, and storage medium
US20230004477A1 (en) Providing a pseudo language for manipulating complex variables of an orchestration flow
US9201937B2 (en) Rapid provisioning of information for business analytics
US9256644B1 (en) System for identifying and investigating shared and derived content
CN112883044B (en) Data processing method and device for database and computer readable medium
CN115878655A (en) Data operation method and device, computer equipment and storage medium
CN110674224B (en) Entity data processing method, device and equipment and computer readable storage medium
JP2014026618A (en) Document management device, control method, control program, and recording medium
CN113504904A (en) User-defined function implementation method and device, computer equipment and storage medium
US10229128B2 (en) Method and apparatus for the generation, organization, storage and retrieval of time stamped blocks of data
US10534766B2 (en) Data management apparatus and data management method
CN112286929B (en) Method and device for generating multi-dimensional data set and computer readable storage medium
WO2019080503A1 (en) Salary intermediate index calculation method, application server and computer storable 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