[go: up one dir, main page]

CN113901025A - Database management method, apparatus, device and storage medium - Google Patents

Database management method, apparatus, device and storage medium Download PDF

Info

Publication number
CN113901025A
CN113901025A CN202111144208.7A CN202111144208A CN113901025A CN 113901025 A CN113901025 A CN 113901025A CN 202111144208 A CN202111144208 A CN 202111144208A CN 113901025 A CN113901025 A CN 113901025A
Authority
CN
China
Prior art keywords
file
database
version
target
files
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
CN202111144208.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.)
Shanghai Perfect Time And Space Software Co ltd
Original Assignee
Shanghai Perfect Time And Space 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 Shanghai Perfect Time And Space Software Co ltd filed Critical Shanghai Perfect Time And Space Software Co ltd
Priority to CN202111144208.7A priority Critical patent/CN113901025A/en
Publication of CN113901025A publication Critical patent/CN113901025A/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/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • 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/23Updating

Landscapes

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

Abstract

The embodiment of the invention provides a database management method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a table related file and a version file, wherein the table related file comprises a text file and a summary file, and the version file records the version number of a database; generating an operation script file, a target database operation file and a logic layer operation file based on the text file, the summary file and the version file, wherein the operation script file is used for assisting in executing the target database operation file in the system; and creating a database or updating the created database based on the operation script file, the target database operation file and the logic layer operation file. The sampling method simplifies the development process of the database, improves the automation degree of the development process of the database, and greatly improves the operation efficiency of the development of the database.

Description

Database management method, device, equipment and storage medium
Technical Field
The present invention relates to the field of database technologies, and in particular, to a database management method, apparatus, device, and storage medium.
Background
The development process of the database is complex, and the problems that the number of database tables to be processed is huge, the database is frequently updated, a large amount of database operation codes need to be written manually, engineering code fields and database code fields are difficult to be checked correspondingly, strict version control is achieved and the like are involved, so that the workload required to be manually input is large, and errors are prone to occurring.
To address the above problems, when creating a database or performing update operations on an existing database, these operations may be assisted by tools. Specifically, the technician may write the logical variables of the engineering code in the text file, input the written text file into the tool, and generate the code segments based on the logical variables by the tool, and the technician needs to add the code segments back to the engineering file. In addition, in the process of updating the database, technicians are also required to select the table-related files, and the files required to be used for the database updating operation are generated by comparing the table-related files before and after updating. Meanwhile, each version of database has its own version number, and in the process of updating the database, a technician is required to manually fill in the version number corresponding to the updated database.
In the process, a large amount of manual participation is still needed, and the operation efficiency is low. The tool only provides splicing operation of each stage, and workflow cannot be realized. In addition, manual operations are prone to errors, which may result in failed database establishment or failed database update.
Disclosure of Invention
The embodiment of the invention provides a database management method, a database management device, equipment and a storage medium, which are used for simplifying the development process of a database and improving the automation degree of the development process of the database.
In a first aspect, an embodiment of the present invention provides a database management method, where the method includes:
acquiring a table related file and a version file, wherein the table related file comprises a text file and a summary file, the text file records an identifier of a database table, an identifier of each field in the database table, data volume and an index, and the version file records a version number of the database;
generating an operation script file, a target database operation file and a logic layer operation file based on the text file, the summary file and the version file, wherein the operation script file is used for assisting in executing the target database operation file in a system;
and creating a database or updating the created database based on the operation script file, the target database operation file and the logic layer operation file.
In a second aspect, an embodiment of the present invention provides a database management apparatus, including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a table related file and a version file, the table related file comprises a text file and a summary file, the text file records an identifier of a database table, an identifier of each field in the database table, data volume and an index, and the version file records a version number of the database;
a generating module, configured to generate an operation script file, a target database operation file, and a logic layer operation file based on the text file, the summary file, and the version file, where the operation script file is used to assist in executing the target database operation file in a system;
and the creating module is used for creating a database or updating the created database based on the operation script file, the target database operation file and the logic layer operation file.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores executable code, and when the executable code is executed by the processor, the processor is enabled to implement at least the database management method in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to implement at least the database management method of the first aspect.
By adopting the method provided by the embodiment of the invention, technicians only need to write the table-related file and the version file, and can automatically generate the operation script file, the target database operation file and the logic layer operation file based on the table-related file and the version file, wherein the operation script file, the target database operation file and the logic layer operation file are all files required for creating a database or updating the database. After the table-related files and the version files are written, all files required for creating the database or updating the database can be automatically generated without further manual participation. The sampling method simplifies the development process of the database, improves the automation degree of the development process of the database, and greatly improves the operation efficiency of the development of the database.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a database management method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of file generation according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a database management apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Fig. 1 is a flowchart of a database management method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
101. and acquiring a table related file and a version file, wherein the table related file comprises a text file and a summary file, and the version file records the version number of the database.
102. And generating an operation script file, a target database operation file and a logic layer operation file based on the text file, the summary file and the version file, wherein the operation script file is used for assisting in executing the target database operation file in the system.
103. And creating a database or updating the created database based on the operation script file, the target database operation file and the logic layer operation file.
It should be noted that the database management method provided by the embodiment of the present invention may be applied to a database in a game server. For the database, compared with the development of other business databases, the database tables in the database in the game server have almost no association, and the target codes can generate codes of different versions according to different configurations. Therefore, the database in the embodiment of the invention has the concept of version, and the generated result contains version information.
The operation script file, the target database operation file and the logic layer operation file are files required to be used for creating a database or performing updating operation on the created database.
The table related file and the version file are edited by technicians, and the technicians do not need to participate in manual work after editing the table related file and the version file. By adopting the method provided by the embodiment of the invention, the labor cost can be greatly saved, and the database development efficiency can be improved.
Alternatively, in the above-described process in which the technician edits the table-related file, the technician may store the edited contents as text in txt format. In addition, in the above-described process of the technician editing the version file, the technician may store the edited contents as a file in the ini format.
The table-related files may include text files and summary files, among others. In one possible implementation, the text file may be, for example, t _ xx.txt, the summary file may be, for example, db info.txt, and the version file may be, for example, db.
It is to be understood that, since all files required to construct or update the database may be generated based on the table-related file and the version file, all information required to construct or update the database is recorded in the table-related file and the version file.
In the process of generating the operation script file, the target database operation file, and the logic layer operation file based on the table-related file and the version file, it may be considered that the operation script file, the target database operation file, and the logic layer operation file include a variable portion and a fixed portion. For the fixed portion, the templated content may be used as it is. For the variable parts, since the variable parts are continuously changed according to specific use requirements, such as different logic variables, a technician is required to input the variable parts into the table-related file and the version file, then the table-related file and the version file can be analyzed and the variable parts can be obtained from the table-related file and the version file, and the operation script file, the target database operation file and the logic layer operation file are finally determined by combining the fixed parts and the variable parts obtained from the input table-related file and the input version file.
For example, a technician enters int m _ a, int m _ b in a text file indicating that two logical variables are to be created. The% d and% d SQL statements can be output according to the corresponding input int m _ a and int m _ b, that is, the fields corresponding to int m _ a and int m _ b are added in the database. Wherein,% d may be stored in the target database operation file.
It will be appreciated that a database has a large number of database tables stored therein, and the process of constructing a database is equivalent to creating a database table. The information needed to create the database tables is recorded in text files, each of which may correspond to a database table. Optionally, the text file records an identification of the database table, an identification of each field in the database table, a data amount, and an index.
Optionally, the summary file records information used by the logical layer to load and store the database tables.
The logic layer may also be regarded as a function side, and when some target functions are implemented, the logic layer needs to operate on logic variables. When the data volume of the logic variables is huge, the logic variables can be stored in a database and managed by the database.
When the logical layer needs some logical variables, the target fields in the database tables of the database (the target fields correspond to the logical variables needed by the logical layer) can be loaded into the memory for the logical layer to operate. The modified values of the logical variables can be stored back in the database table by running certain logic to modify the values of the logical variables. The logic variable exists in the memory, the field in the database table exists in the database, and the two have a one-to-one correspondence relationship. For example, if there is a logic variable m _ Money in the memory, there is a field Money in the database. And reading the value of m _ Money from the database, and storing the value back to the database after the logical layer is modified.
As can be seen from the above description, there are interactions between the logical layer and the database, which may be load and store operations of the logical layer on fields in the database tables. The loading and storing operations are embodied by a logical layer operation file, and information required for generating the logical layer operation file is recorded in a summary file. Therefore, when a database is created or updated, a logical layer operation file used in the operation process of the logical layer on the database table also needs to be generated.
It should be noted that each database table corresponds to a logical layer operation code for the logical layer to perform loading and storing operations (the logical layer operation code is stored in the logical layer operation file), and a code template for generating the logical layer operation code corresponding to each database table is recorded in the summary file.
The version file in the embodiment of the present invention is used to record the version number of the database, including the version number of the database before updating and the version number of the database after updating, and may also be referred to as an old version number of the database and a current version number of the database.
It should be noted that if the database is not created, the database needs to be created. If a database is created and a modification to a field in the database is required, the database need not be created, but may be updated. For example, the current version number is 2.0, the old version number is 1.0, and the database 2.0 is added with an a field compared with the database 1.0, and the a field can be added when upgrading from the database 1.0 to the database 2.0.
The operation script file in the embodiment of the present invention may also be a shell file. The shell is a program written in C language, and is a bridge for users to use Linux. The shell is a command language and a programming language. shell refers to an application that provides an interface through which a user accesses the services of the operating system kernel. The automatically generated target database operation file is a file which can be executed, and the execution of the target database operation file needs to depend on the operation script file.
The operation object of the target database operation file is a database, the operation object of the logic layer operation file is a logic layer, and the operation objects are different. Optionally, the target database operation file is a file written using Structured Query Language (SQL). The creation and updating operation of the database can be realized through SQL sentences in the target database operation file, and the generation operation of the database table can also be realized. It should be noted that, the text file records relevant information required for generating the target database operation file, the SQL statements in the target database operation file can be generated through the text file, and the database table can be created by executing the SQL statements.
Accordingly, the logical layer operation files are files written in the C + + language. As previously described, the logical layer operation file is used to implement logical layer load and store operations on fields in a database table.
Alternatively, as shown in fig. 2, the process of generating the operation script file, the target database operation file and the logic layer operation file based on the text file, the summary file and the version file may be implemented as follows:
201. and generating an operation script file and a target database operation file associated with the version number of the database based on the text file and the version file, wherein the content of the target database operation file is empty.
The version number of the database can be a current version number, the current version number is input into a version file by technical personnel, and the current version number can be obtained by analyzing the version file.
In this step, the empty target database operation file and the operation script file with the current version number may be generated first, and then the content may be added to the empty target database operation file. When the database is not created, the target database operation file is used for creating the database, and when the database is created, the target database operation file is used for updating the database. The target database operation file is also used for providing an operation interface for loading and storing the database table for the logic layer, wherein the operation interface is an SQL statement. Accordingly, the operational script file may also be used to assist in the execution of a target database operation file for creating or updating a database in the system.
202. A database operation code is determined.
The database operation code is the content that can be added to the target database operation file in step 301. The database operation code is an SQL statement, and the database operation code can realize the creation and updating operation of the database and provide an operation interface for loading and storing.
Alternatively, the process of determining the database operation code may be implemented as: generating an operation object corresponding to the database table based on the text file; based on the operation object, a database operation code is determined.
Each text file corresponds to a database table, the text files comprise information of identification of the database table, identification of each field in the database table, data volume and index, and one database table can be determined according to the information.
In practical applications, a technician may write a plurality of text files, and may traverse the plurality of text files one by one to generate an operation object corresponding to each database table. And after generating the operation object corresponding to each database table, generating an operation interface for each operation object, wherein the operation interface is used for carrying out loading and storing operation on each database table by a logic layer.
203. And adding the database operation code into the target database operation file.
204. And generating a logic layer operation file based on the summary file.
The summary file comprises code templates required to be used for generating the logic layer operation codes corresponding to the database tables, so that the logic layer operation file can be generated based on the code templates in the summary file. In addition, because the fields in the database table and the logical variables in the logical layer are in one-to-one correspondence, after the fields in the database table are created, the logical variables in the logical layer can also be correspondingly created, and the logical variables can also be embodied in the logical layer operation file.
In one possible implementation, the operation script file may be, for example, Update _ db.sh, Create _ db.sh, the target database operation file may be, for example, xx _ table _ mysql.sql.sql.sql, xx _ data _ mysql.sql.sql.sql, xx _ oldv _ newv.sql, and the logical layer operation file may be, for example, t _ xx.h.
If a database is created and needs to be updated currently, the updating process can be implemented as follows: acquiring the version number of the database before updating from the version file; determining an old database operation file corresponding to the version number of the database before updating; comparing the old database operation file with the target database operation file to generate a database updating operation file; and updating the database based on the database updating operation file.
The database update operation file may be composed of SQL statements.
For ease of understanding, the process of database updating is described below in a specific example. Assuming that there is already a database of 1.0, the database needs to be updated from version 1.0 to version 2.0. The database operation file corresponding to the database 1.0 and the database operation file corresponding to the database 2.0 can be compared, then a database update operation file is generated according to the difference between the database operation file and the database operation file, and finally the database 1.0 is upgraded based on the database update file.
By adopting the method provided by the embodiment of the invention, technicians only need to write the table-related file and the version file, and can automatically generate the operation script file, the target database operation file and the logic layer operation file based on the table-related file and the version file, wherein the operation script file, the target database operation file and the logic layer operation file are all files required for creating a database or updating the database. After the table-related files and the version files are written, all files required for creating the database or updating the database can be automatically generated without further manual participation. The sampling method simplifies the development process of the database, improves the automation degree of the development process of the database, and greatly improves the operation efficiency of the development of the database.
The database management apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these database management means may be constructed by configuring the steps taught in the present solution using commercially available hardware components.
Fig. 3 is a schematic structural diagram of a database management apparatus according to an embodiment of the present invention, as shown in fig. 3, the apparatus includes:
the acquiring module 31 is configured to acquire a table-related file and a version file, where the table-related file includes a text file and a summary file, the text file records an identifier of a database table, identifiers of fields in the database table, a data volume and an index, and the version file records a version number of the database;
a generating module 32, configured to generate an operation script file, a target database operation file, and a logic layer operation file based on the text file, the summary file, and the version file, where the operation script file is used to assist in executing the target database operation file in a system;
a creating module 33, configured to create a database or update the created database based on the operation script file, the target database operation file, and the logic layer operation file.
Optionally, the text file records an identifier of a database table, an identifier of each field in the database table, a data volume and an index;
the summary file records information used by the logic layer for loading and storing the database table.
Optionally, the generating module 32 is configured to:
generating an operation script file and a target database operation file associated with the version number of the database based on the text file and the version file, wherein the content of the target database operation file is empty;
determining a database operation code;
adding the database operation code to the target database operation file;
and generating a logic layer operation file based on the summary file.
Optionally, the generating module 32 is configured to:
generating an operation object corresponding to a database table based on the text file;
and determining a database operation code based on the operation object.
Optionally, the apparatus further comprises an update module, configured to:
acquiring the version number of the database before updating from the version file;
determining an old database operation file corresponding to the version number of the database before updating;
comparing the old database operation file with the target database operation file to generate a database updating operation file;
and updating the database based on the database updating operation file.
Optionally, the database operation file is a file written using structured query language SQL.
Optionally, the logic layer operation file is a file written in C + + language.
The apparatus shown in fig. 3 may perform the database management method provided in the foregoing embodiments shown in fig. 1 to fig. 2, and the detailed implementation process and technical effect refer to the description in the foregoing embodiments, which are not described herein again.
In one possible design, the structure of the database management apparatus shown in fig. 3 may be implemented as an electronic device, as shown in fig. 4, which may include: a processor 41, and a memory 42. Wherein the memory 42 has stored thereon executable code, which when executed by the processor 41, causes the processor 41 to implement at least the database management method as provided in the embodiments of fig. 1-2 described above.
Optionally, the electronic device may further include a communication interface 43 for communicating with other devices.
In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to implement at least the database management method provided in the foregoing embodiments shown in fig. 1 to 2.
The above-described apparatus embodiments are merely illustrative, wherein the units described as separate components may or may not be physically separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
The database management method provided in the embodiment of the present invention may be executed by a certain program/software, the program/software may be provided by a network side, the electronic device mentioned in the foregoing embodiment may download the program/software into a local nonvolatile storage medium, and when it needs to execute the foregoing database management method, the program/software is read into a memory by a CPU, and then the CPU executes the program/software to implement the database management method provided in the foregoing embodiment, and the execution process may refer to the schematic in fig. 1 to fig. 2.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1.一种数据库管理方法,其特征在于,包括:1. a database management method, is characterized in that, comprises: 获取表相关文件和版本文件,所述表相关文件包括文本文件和汇总文件,所述文本文件记录有数据库表的标识、数据库表中各字段的标识、数据量和索引,所述版本文件记录有数据库的版本号;Obtain table-related files and version files, the table-related files include text files and summary files, and the text files are recorded with the identification of the database table, the identification of each field in the database table, the amount of data and the index, and the version file is recorded with The version number of the database; 基于所述文本文件、所述汇总文件和所述版本文件,生成操作脚本文件、目标数据库操作文件以及逻辑层操作文件,所述操作脚本文件用于在系统中辅助执行所述目标数据库操作文件;Based on the text file, the summary file and the version file, an operation script file, a target database operation file and a logic layer operation file are generated, and the operation script file is used to assist in the execution of the target database operation file in the system; 基于所述操作脚本文件、所述目标数据库操作文件以及所述逻辑层操作文件,创建数据库或者对已创建的数据库进行更新。Based on the operation script file, the target database operation file and the logic layer operation file, a database is created or the created database is updated. 2.根据权利要求1所述的方法,其特征在于,所述汇总文件记录有逻辑层对数据库表进行加载和存储操作使用的信息。2 . The method according to claim 1 , wherein the summary file records information used by the logic layer for loading and storing database tables. 3 . 3.根据权利要求2所述的方法,其特征在于,所述基于所述文本文件、所述汇总文件和所述版本文件,生成操作脚本文件、目标数据库操作文件以及逻辑层操作文件,包括:3. The method according to claim 2, wherein generating an operation script file, a target database operation file and a logic layer operation file based on the text file, the summary file and the version file, comprising: 基于所述文本文件和所述版本文件,生成操作脚本文件以及与数据库的版本号关联的目标数据库操作文件,所述目标数据库操作文件的内容为空;Based on the text file and the version file, an operation script file and a target database operation file associated with the version number of the database are generated, and the content of the target database operation file is empty; 确定数据库操作代码;Determine the database operation code; 将所述数据库操作代码添加到所述目标数据库操作文件中;adding the database operation code to the target database operation file; 基于所述汇总文件,生成逻辑层操作文件。Based on the summary file, a logic layer operation file is generated. 4.根据权利要求3所述的方法,其特征在于,所述确定数据库操作代码,包括:4. The method according to claim 3, wherein the determining the database operation code comprises: 基于所述文本文件,生成数据库表对应的操作对象;Based on the text file, an operation object corresponding to the database table is generated; 基于所述操作对象,确定数据库操作代码。Based on the operation object, a database operation code is determined. 5.根据权利要求3所述的方法,其特征在于,所述方法还包括:5. The method according to claim 3, wherein the method further comprises: 从所述版本文件中获取更新前的数据库的版本号;Obtain the version number of the database before the update from the version file; 确定所述更新前的数据库的版本号对应的旧数据库操作文件;Determine the old database operation file corresponding to the version number of the database before the update; 对比所述旧数据库操作文件和所述目标数据库操作文件,以生成数据库更新操作文件;Compare the old database operation file and the target database operation file to generate a database update operation file; 基于所述数据库更新操作文件,对数据库进行更新。The database is updated based on the database update operation file. 6.根据权利要求1-5中任一项所述的方法,其特征在于,所述数据库操作文件为使用结构化查询语言SQL编写的文件。6. The method according to any one of claims 1-5, wherein the database operation file is a file written using structured query language SQL. 7.根据权利要求1-5中任一项所述的方法,其特征在于,所述逻辑层操作文件为使用C++语言编写的文件。7 . The method according to claim 1 , wherein the logic layer operation file is a file written in C++ language. 8 . 8.一种数据库管理装置,其特征在于,包括:8. A database management device, comprising: 获取模块,用于获取表相关文件和版本文件,所述表相关文件包括文本文件和汇总文件,所述文本文件记录有数据库表的标识、数据库表中各字段的标识、数据量和索引,所述版本文件记录有数据库的版本号;The acquisition module is used to acquire table related files and version files, the table related files include text files and summary files, and the text files are recorded with the identification of the database table, the identification of each field in the database table, the amount of data and the index, so The above version file records the version number of the database; 生成模块,用于基于所述文本文件、所述汇总文件和所述版本文件,生成操作脚本文件、目标数据库操作文件以及逻辑层操作文件,所述操作脚本文件用于在系统中辅助执行所述目标数据库操作文件;A generating module is used to generate an operation script file, a target database operation file and a logic layer operation file based on the text file, the summary file and the version file, and the operation script file is used to assist in the execution of the target database operation file; 创建模块,用于基于所述操作脚本文件、所述目标数据库操作文件以及所述逻辑层操作文件,创建数据库或者对已创建的数据库进行更新。The creation module is configured to create a database or update the created database based on the operation script file, the target database operation file and the logic layer operation file. 9.一种电子设备,其特征在于,包括:存储器、处理器;其中,所述存储器上存储有可执行代码,当所述可执行代码被所述处理器执行时,使所述处理器执行如权利要求1-7中任一项所述的数据库管理方法。9. An electronic device, comprising: a memory and a processor; wherein executable code is stored on the memory, and when the executable code is executed by the processor, the processor is executed The database management method according to any one of claims 1-7. 10.一种非暂时性机器可读存储介质,其特征在于,所述非暂时性机器可读存储介质上存储有可执行代码,当所述可执行代码被电子设备的处理器执行时,使所述处理器执行如权利要求1-7中任一项所述的数据库管理方法。10. A non-transitory machine-readable storage medium, wherein executable codes are stored on the non-transitory machine-readable storage medium, and when the executable codes are executed by a processor of an electronic device, The processor executes the database management method according to any one of claims 1-7.
CN202111144208.7A 2021-09-28 2021-09-28 Database management method, apparatus, device and storage medium Pending CN113901025A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111144208.7A CN113901025A (en) 2021-09-28 2021-09-28 Database management method, apparatus, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111144208.7A CN113901025A (en) 2021-09-28 2021-09-28 Database management method, apparatus, device and storage medium

Publications (1)

Publication Number Publication Date
CN113901025A true CN113901025A (en) 2022-01-07

Family

ID=79189005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111144208.7A Pending CN113901025A (en) 2021-09-28 2021-09-28 Database management method, apparatus, device and storage medium

Country Status (1)

Country Link
CN (1) CN113901025A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116226092A (en) * 2023-04-24 2023-06-06 北京炎黄广智科技发展有限责任公司 Database updating method and device
CN119440590A (en) * 2025-01-10 2025-02-14 天津南大通用数据技术股份有限公司 Database upgrade method, device, equipment, storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402559A (en) * 2010-09-16 2012-04-04 中兴通讯股份有限公司 Method and device for generating database upgrading script
CN107273425A (en) * 2017-05-18 2017-10-20 武汉普利商用机器有限公司 A kind of Database Development Method and device based on ORM frameworks
CN108491218A (en) * 2018-03-12 2018-09-04 浙江中控技术股份有限公司 A kind of method and apparatus of databases comparison file generated
CN109614085A (en) * 2018-10-23 2019-04-12 深圳微迅信息科技有限公司 Function realizing method, device, computer equipment and storage medium
CN110147225A (en) * 2019-04-02 2019-08-20 平安科技(深圳)有限公司 A kind of code generating method, device and computer equipment, storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402559A (en) * 2010-09-16 2012-04-04 中兴通讯股份有限公司 Method and device for generating database upgrading script
CN107273425A (en) * 2017-05-18 2017-10-20 武汉普利商用机器有限公司 A kind of Database Development Method and device based on ORM frameworks
CN108491218A (en) * 2018-03-12 2018-09-04 浙江中控技术股份有限公司 A kind of method and apparatus of databases comparison file generated
CN109614085A (en) * 2018-10-23 2019-04-12 深圳微迅信息科技有限公司 Function realizing method, device, computer equipment and storage medium
CN110147225A (en) * 2019-04-02 2019-08-20 平安科技(深圳)有限公司 A kind of code generating method, device and computer equipment, storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116226092A (en) * 2023-04-24 2023-06-06 北京炎黄广智科技发展有限责任公司 Database updating method and device
CN116226092B (en) * 2023-04-24 2023-08-08 北京炎黄广智科技发展有限责任公司 Database updating method and device
CN119440590A (en) * 2025-01-10 2025-02-14 天津南大通用数据技术股份有限公司 Database upgrade method, device, equipment, storage medium and program product
CN119440590B (en) * 2025-01-10 2025-06-03 天津南大通用数据技术股份有限公司 Database upgrading method, device, equipment, storage medium and program product

Similar Documents

Publication Publication Date Title
US9940108B2 (en) Automated merging in a software development environment
CN114528008A (en) Code control method, device and medium based on distributed version control system
CN114610286A (en) Method, device, computer equipment and storage medium for generating development documents
CN113901025A (en) Database management method, apparatus, device and storage medium
CN112274913A (en) Game server merging method and device, storage medium and electronic device
CN118708321A (en) Application program migration method, device, equipment and storage medium
CN117897710A (en) An AI approach to solving industrial data conversion problems
US9436460B2 (en) Regression alerts
CN113535147B (en) A method, device, electronic terminal and storage medium for generating a calling code
WO2025093052A1 (en) Low-code conversion method and apparatus, readable storage medium, and device
CN113504904A (en) User-defined function implementation method and device, computer equipment and storage medium
CN118939635A (en) Data migration method, device, terminal device and computer readable storage medium
CN118210488A (en) Method, system and terminal equipment for generating codes and interface documents based on sql
CN118092900A (en) A component development method, device, equipment and storage medium
US11182272B2 (en) Application state monitoring
CN111090638A (en) Method and device for comparing transaction functions in database migration
CN115543936A (en) Method, device, equipment and storage medium for batch construction of model files
JP2019008799A (en) System and method for merging source data from source application into target data of target application
CN113343649A (en) File annotation method and device, storage medium and computing equipment
CN114449063A (en) Message processing method, device and equipment
CN112380142A (en) Interface document management method and device and test equipment
CN118550548B (en) Software item migration and optimization method, device, computing equipment and storage medium
CN119847534B (en) Modelica model compilation method, device, equipment and storage medium
CN116881218B (en) A meta-model and model processing method, device and computing device cluster
CN119847535A (en) Data processing method, satellite device, computing device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination