Movatterモバイル変換


[0]ホーム

URL:


CN111597165B - Database management method, terminal and storage medium - Google Patents

Database management method, terminal and storage medium
Download PDF

Info

Publication number
CN111597165B
CN111597165BCN202010304148.XACN202010304148ACN111597165BCN 111597165 BCN111597165 BCN 111597165BCN 202010304148 ACN202010304148 ACN 202010304148ACN 111597165 BCN111597165 BCN 111597165B
Authority
CN
China
Prior art keywords
database
user
update
information
current version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010304148.XA
Other languages
Chinese (zh)
Other versions
CN111597165A (en
Inventor
关瑞
吴闽华
姜坤
卫宣安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Zhenyou Communication Technology Co ltd
Original Assignee
Xi'an Zhenyou Communication Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Zhenyou Communication Technology Co ltdfiledCriticalXi'an Zhenyou Communication Technology Co ltd
Priority to CN202010304148.XApriorityCriticalpatent/CN111597165B/en
Publication of CN111597165ApublicationCriticalpatent/CN111597165A/en
Application grantedgrantedCritical
Publication of CN111597165BpublicationCriticalpatent/CN111597165B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a database management method, a terminal and a storage medium, wherein the database management method comprises the following steps: acquiring input user information, and entering a corresponding management interface according to the user information and interface options selected by a user; recording the updating operation of the user in the management interface and the updating information of the user to a database; checking the current version of the database according to the updating operation and the updating information; and updating the current version of the database according to the verification result, or recovering the current version of the database to the previous version. When a user updates the database, the invention records the update operation executed by the user and the corresponding update information, thereby checking the version of the database according to the recorded information, and facilitating the update or recovery of the version of the database by a developer through managing the data change in the database.

Description

Database management method, terminal and storage medium
Technical Field
The present invention relates to the field of terminal applications, and in particular, to a database management method, a terminal, and a storage medium.
Background
In the process of software development, the version of the database needs to be managed and controlled, and when a plurality of people develop a database management and application system at the same time, a reasonable method is adopted to monitor the change of objects such as a data table, a storage process, a view and the like in the database, which is an important link in the database management process.
Because, each change of the database requires detailed recording; thus, in the development process, it is often involved in adding columns to the data table, modifying columns, and modifying stored procedures/views; after the data in the database changes, the database objects defined previously are lost, so a complete database version management method is needed to manage the database.
Accordingly, the prior art is still in need of improvement and development.
Disclosure of Invention
The invention aims at solving the technical problems of the prior art, and provides a database management method, a terminal and a storage medium, wherein the database management tool is used for managing data change in a database so as to facilitate the updating or recovery of a version of the database by a developer.
The technical scheme adopted for solving the technical problems is as follows:
in a first aspect, the present invention provides a database management method, wherein the database management method includes the steps of:
acquiring input user information, and entering a corresponding management interface according to the user information and interface options selected by a user;
recording the updating operation of the user in the management interface and the updating information of the user to a database;
checking the current version of the database according to the updating operation and the updating information;
and updating the current version of the database according to the verification result, or recovering the current version of the database to the previous version.
Further, the method further comprises the following steps:
and setting user permission in advance according to the user information.
Further, the step of acquiring the input user information and entering a corresponding management interface according to the user information and the interface options selected by the user specifically comprises the following steps:
acquiring user information input by the user;
verifying the user information and determining the user authority of the user;
and acquiring the interface options selected by the user, and entering a corresponding management interface according to the interface options and the user permission.
Further, the recording the updating operation of the user in the management interface and the updating information of the user to the database specifically includes the following steps:
screening users entering the management interface according to preset conditions;
recording the update operation, update information, updated content and update time executed by the selected user;
and generating an update log according to the update operation, the update information, the updated content and the update time.
Further, the verifying the current version of the database according to the update operation and the update information specifically includes the following steps:
checking the current version of the database according to the update log, and judging whether the definition object of the database in the current version is updated or not;
if the definition object of the database in the current version is not updated, judging that the current version of the database is not abnormal;
and if the definition object of the database in the current version is updated, judging that the current version of the database is abnormal.
Further, the updating the current version of the database according to the verification result specifically includes the following steps:
searching a position corresponding to the updated content according to the update log;
setting corresponding update nodes at the searched positions;
writing the update information in the update log into the update node to update the current version of the database.
Further, the restoring the current version of the database to the previous version specifically includes the following steps:
searching the original definition object of the database according to the updated content;
and recovering the current version of the database to the previous version according to the original definition object.
Further, the management interface includes: user management interface, role management interface and node management interface.
In a second aspect, the present invention further provides a terminal, which includes a processor, and a memory connected to the processor, where the memory stores a database management program, and the database management program is used to implement the operation of the database management method according to the first aspect when executed by the processor.
In a third aspect, the present invention also provides a storage medium storing a database management program for implementing the operations of the database management method according to the first aspect when the database management program is executed by a processor.
The technical scheme adopted by the invention has the following effects:
when a user updates the database, the invention records the update operation executed by the user and the corresponding update information, thereby checking the version of the database according to the recorded information, and facilitating the update or recovery of the version of the database by a developer through managing the data change in the database.
Drawings
FIG. 1 is a flow chart of a database management method in an embodiment of the invention.
FIG. 2 is a flow chart of a process of a user management interface in an embodiment of the invention.
Fig. 3 is a flowchart of a process of a character management interface in an embodiment of the present invention.
FIG. 4 is a flow chart of a process of a node management interface in an embodiment of the invention.
Fig. 5 is a functional schematic of a terminal in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clear and clear, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
In the process of software development, no matter a developer or a database operation maintainer can have a common script to be saved, the existing saving mode is to save the script in a file form through SQL format codes, and the saving mode is inconvenient for general users to use and is inconvenient for managers to conduct classified management.
In order to facilitate management of databases by a software development team, the present embodiment provides a database management method, where the database management method is applied to a terminal, and the terminal includes, but is not limited to: mobile terminals, tablets, computers, and other devices; and a management tool for managing the version of the database is installed in the terminal, and a team of software developers can manage the version of the database by using the management tool, so that an application program and the database are placed in the same version, and the problems of the published program can be traced back in the development process of the developers conveniently.
As shown in fig. 1, in one implementation manner of the present embodiment, the database management method includes the following steps:
step S100, input user information is obtained, and a corresponding management interface is entered according to the user information and interface options selected by a user.
In the process of software development, the storage process of the database version automatically covers the previous database version, so that the definition of the object of the previous database version is lost; for example, developer A creates a stored procedure "ProcA" and then developer B modifies the stored procedure "ProcA", which will be overridden by the modification made by developer B, resulting in the loss and inability to recover the previously defined stored procedure.
Through the management tool of the embodiment, all operations of a certain database can be completely recorded; by searching the operation record, the database operation executed by the operator before can be obtained; for example, it may be found that the stored procedure "ProcA" was created by developer a and the database was modified at some point by developer B.
In the process of software development, the problem of database, such as database error reporting or database performance degradation, is possibly caused by the upgrading of an application program or the modification of a database, so that the method is extremely important for the management of the version of the database; the management tool adopted in the embodiment can quickly check the difference between the current database version and the previous database version, and inquire the abnormality of the database according to specific conditions, thereby eliminating the abnormality and keeping the database running stably.
Specifically, before using the management tool, user rights of each user (i.e., a software developer) need to be set, and user information can be input into the management tool when the user rights of each user are set, wherein the user information comprises information such as a user name, a user password, a user position and the like; then, user rights to use the management tool are set according to user information input by the user, so that a manager sets operation rights of each user according to the user rights.
By setting the user authority, corresponding authorities can be distributed for different users so that each user can take part in the job, and the phenomenon of misoperation is avoided; for example: the erroneous deletion occurs because individual users do not understand the meaning of the data packets in the database.
I.e. before said step S100, the method further comprises the steps of:
and S001, setting user permission in advance according to the user information.
In this embodiment, after setting the user rights, each user may use the functions in the corresponding management interface according to his own user rights, and perform corresponding operations through the user rights; for example, modifying a database version storage path, looking up database version anomaly information, managing database versions, and the like.
Specifically, when a user logs into the management tool, user information input by the user may be acquired, and the user information may be verified, for example: verifying a user name, a user password, a user position and the like; if the user information is successfully verified, the user authority of the user is further determined according to the user information; the user permission of each preset user is searched to obtain a search result, and the user permission of the current login management tool is determined according to the search result; if the verification fails, corresponding prompt is carried out on the login interface of the management tool.
After verifying the user information and determining the user authority, acquiring an interface option selected by the user in a login interface, and entering a corresponding management interface according to the user authority and the interface option, wherein the management interface comprises: a user management interface, a role management interface and a node management interface; when a user enters a corresponding management interface, a corresponding operation may be performed in the corresponding management interface to implement a corresponding function, for example: modifying data in the database, managing information of each user, managing version of the database, and the like.
In the management tool, the user management interface may be configured to filter user information and edit user information, where the editing user information includes: newly adding, modifying and deleting user information; the role management interface can be used for setting the role (namely the role of the user) of each user, setting corresponding user rights and the like according to the roles of the users; the node management interface can be used for inquiring information such as version information, patch information, modification information and the like of the database, setting corresponding updating nodes, and updating or recovering the version of the database according to the version verification result of the database.
Namely, the step S100 specifically includes the following steps:
step S110, obtaining user information input by the user;
step S120, verifying the user information and determining the user authority of the user;
step S130, the interface options selected by the user are obtained, and the corresponding management interface is entered according to the interface options and the user permission.
In the embodiment, the user permission of each user is set, and when the user logs in the management tool, the input user information is verified, so that the user permission of the user is determined according to the input user information, and the user is given corresponding functions and operation permissions according to the determined user permission.
As shown in fig. 1, in one implementation manner of the present embodiment, the database management method further includes the following steps:
and step 200, recording the updating operation of the user in the management interface and the updating information of the user to the database.
In this embodiment, after entering a corresponding management interface, each user may record operation information executed by the user through the management tool, and record update information set by each user when updating data information in the database, so as to determine whether the current version of the database can be updated according to the recorded update operation and the update information, that is, verify the current version of the database according to the update information and the update operation; meanwhile, the updating operation and the updating information are recorded, so that subsequent maintenance personnel can conveniently inquire the corresponding abnormal conditions from the recorded information.
Specifically, when the update operation and the update information are recorded, the user entering the management interface is screened according to preset conditions, wherein the preset conditions are that the set job requirements are met, for example: the set job position requirement is a manager; then, selecting users meeting the job requirements, and recording the updating operation of the users; if the user clicks the database editing button, when the user finishes editing, recording the operation executed by the user, the update information generated in the editing process and the modified content recorded in the editing process; generating an update log according to the update operation, the update information, the update time and the modified content (original information before update) executed by the user; for example, the generated update log is: modification version information, version information 1.13, original version information 1.12, modification time XX, and executor Y.
Further, when the update operation and the update information are recorded, the database can be synchronized according to the update information, and a database version number based on the update information is generated after each synchronization, wherein the database version number can contain a plurality of modifications or patches, but in some special cases, additional tags are required to be set; for example: and managing some changes in the database, classifying versions in the database and other updating operations, and setting additional tags so as to query or acquire corresponding updating operations according to the additional tags.
Namely, the step S200 specifically includes the following steps:
step S210, screening users entering the management interface according to preset conditions;
step S220, recording the update operation, update information, updated content and update time executed by the selected user;
step 230, generating an update log according to the update operation, the update information, the updated content and the update time.
According to the embodiment, the update operation and the update information of the user in the management interface are recorded, and the current version of the database can be checked according to the recorded information, so that when the update of the version of the database fails, the version of the database can be restored according to the recorded update operation and the recorded update information; and by recording the operation information and the update information executed by each user, the subsequent maintenance personnel can conveniently inquire the corresponding abnormal conditions from the recorded information.
As shown in fig. 1, in one implementation manner of the present embodiment, the database management method further includes the following steps:
and step S300, checking the current version of the database according to the updating operation and the updating information.
In this embodiment, after the update operation and the update information are recorded, if it is detected that the user upgrades the current version of the database, the current version of the database is checked according to the update operation and the update information, so as to determine whether the current version of the database can be upgraded.
Specifically, when checking the current version of the database, the definition object of the database can be checked according to the content in the update log, and when the update log contains the definition object of the database, the definition object of the database in the current version is different from the definition object of the previous version; in short, when checking, judging whether the definition object of the database in the current version is updated, if the definition object of the database in the current version is not updated, judging that the current version of the database is not abnormal, and at the moment, updating the current version of the database; if the definition object of the database in the current version is updated, determining that the current version of the database is abnormal, and at the moment, indicating that the current version of the database is not suitable for updating.
Namely, the step S300 specifically includes the following steps:
step S310, checking the current version of the database according to the update log, and judging whether the definition object of the database in the current version is updated or not;
step S320, if the definition object of the database in the current version is not updated, judging that the current version of the database is not abnormal;
step S330, if the definition object of the database in the current version is updated, determining that the current version of the database is abnormal.
In the embodiment, the current version of the database is checked to judge whether the definition object in the current version of the database is lost, and if the verification is successful, the current version of the database is upgraded, so that the running stability of the upgraded database is ensured; if the verification fails, the lost definition object can be recovered according to specific conditions, so that errors are rapidly removed, and the continuous and stable operation of the database is ensured.
As shown in fig. 1, in one implementation manner of the present embodiment, the database management method further includes the following steps:
and step S400, updating the current version of the database according to the verification result, or recovering the current version of the database to the previous version.
In this embodiment, after checking the current version of the database, the current version of the database may be updated according to the checking result, so that a user who subsequently develops may stably run the updated new version; or recovering the current version of the database to the previous version according to the verification result, so as to recover the lost definition object according to specific conditions, thereby rapidly eliminating errors and ensuring continuous and stable operation of the database.
Specifically, when the current version of the database is updated, searching a position corresponding to the updated content according to the update log, and setting a corresponding update node at the searched position; and then, writing the update information in the update log into the update node to update the current version of the database.
Namely, in the step S400, the current version of the database is updated according to the verification result, which specifically includes the following steps:
step S411, searching the position corresponding to the updated content according to the update log;
step S412, setting corresponding update nodes at the searched positions;
step S413, writing the update information in the update log into the update node to update the current version of the database.
Specifically, when the current version of the database is recovered, the definition object of the database can be searched according to the updated content in the update log, and then the lost definition object is recovered according to specific conditions, so that errors are rapidly eliminated and continuous and stable operation of the database is ensured.
Namely, in the step S400, the method for restoring the current version of the database to the previous version specifically includes the following steps:
step S421, searching the original definition object of the database according to the updated content;
step S422, recovering the current version of the database to the previous version according to the original defined object.
In actual application, different updating operations are executed for different management interfaces, and the user management interface, the role management interface and the node management interface are described below.
As shown in fig. 2, the following steps are included in the user management interface:
step S11, entering a user management page;
step S12, screening user information according to conditions;
step S13, displaying users meeting the conditions;
step S14, clicking an editing button by a user;
step S15, judging whether the user has editing authority; if yes, go to step S16; if not, executing step S17;
s16, entering an editing page;
step S17, prompting that no editing authority exists, and returning to step S13;
and S18, completing editing and storing in a database.
When entering the user management page, if the user needs to add the user information, entering the new page according to the new button clicked by the user, and storing the new user information into the database after the user inputs the user information.
As shown in fig. 3, the role management interface includes the following steps:
step S21, entering a role management interface;
step S22, displaying the existing role information;
step S23, selecting a user;
step S24, clicking an editing button by a user;
step S25, entering an editing interface;
step S26, editing is completed and the database is stored.
When entering the character management interface, if the user needs to add the character information, entering a new page according to the new button clicked by the user, and storing the new character information into a database after the character information is input by the user.
As shown in fig. 4, the node management interface includes the following steps:
step S31, selecting branches to which database versions belong;
step S32, newly adding a modification node;
step S33, selecting modification information, and modifying the modification information;
step S34, newly adding a patch;
step S35, selecting patch information;
step S36, newly adding the version information of the database.
The patch is a program for repairing system loopholes in a database version, belongs to a child node under the database version and is used for repairing problems and small changes in the database version;
modifying the modification information refers to one change of the database version, and is the atomic data of the database version management tool; after associating with a version under a branch, the current version of the database is in an associated state.
The embodiment can realize the modification of the storage process executed by the software development by multiple persons or the modification of the function codes in the software, and control the version of the database for the software development, namely, the application program and the database are placed under the same version, so that the problems of the released program can be traced in the process of the software development, thereby being convenient for the tracing personnel of the software development to carry out related modification on the database; and by checking the version of the software development, the version of the database generated in the software development process is checked, so that the database is updated according to the checking result, or the database is restored to a stable state.
Example two
As shown in fig. 5, the present embodiment provides a terminal, which includes aprocessor 10, and amemory 20 connected to theprocessor 10, where thememory 20 stores a database management program, and the database management program is used to implement the operations of the database management method according to the first embodiment when executed by theprocessor 10; as described in detail above.
Example III
The present embodiment provides a storage medium storing a database management program for implementing the operations of the database management method according to the first embodiment when the database management program is executed by a processor; as described in detail above.
In summary, when the user updates the database, the update operation executed by the user and the corresponding update information are recorded, so that the version of the database is checked according to the recorded information, and the version of the database is updated or restored by the developer conveniently by managing the data change in the database.
Of course, those skilled in the art will appreciate that implementing all or part of the above-described methods may be implemented by a computer program for instructing relevant hardware (such as a processor, a controller, etc.), where the program may be stored in a computer-readable storage medium, and where the program may include the steps of the above-described method embodiments when executed. The storage medium may be a memory, a magnetic disk, an optical disk, or the like.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.

Claims (9)

CN202010304148.XA2020-04-172020-04-17Database management method, terminal and storage mediumActiveCN111597165B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010304148.XACN111597165B (en)2020-04-172020-04-17Database management method, terminal and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010304148.XACN111597165B (en)2020-04-172020-04-17Database management method, terminal and storage medium

Publications (2)

Publication NumberPublication Date
CN111597165A CN111597165A (en)2020-08-28
CN111597165Btrue CN111597165B (en)2023-06-02

Family

ID=72185185

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010304148.XAActiveCN111597165B (en)2020-04-172020-04-17Database management method, terminal and storage medium

Country Status (1)

CountryLink
CN (1)CN111597165B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US5043871A (en)*1986-03-261991-08-27Hitachi, Ltd.Method and apparatus for database update/recovery
CN110059096A (en)*2019-03-162019-07-26平安城市建设科技(深圳)有限公司Data version management method, apparatus, equipment and storage medium
CN110569311A (en)*2019-10-302019-12-13上海商魁信息科技有限公司Data synchronization method and device for database and computer storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US5043871A (en)*1986-03-261991-08-27Hitachi, Ltd.Method and apparatus for database update/recovery
CN110059096A (en)*2019-03-162019-07-26平安城市建设科技(深圳)有限公司Data version management method, apparatus, equipment and storage medium
CN110569311A (en)*2019-10-302019-12-13上海商魁信息科技有限公司Data synchronization method and device for database and computer storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
C/S模式管理信息系统实现自动升级和维护的方法;余颖,董旭源,高宏;佳木斯大学学报(自然科学版)(02);全文*

Also Published As

Publication numberPublication date
CN111597165A (en)2020-08-28

Similar Documents

PublicationPublication DateTitle
US11775486B2 (en)System, method and computer program product for database change management
US9971595B1 (en)Techniques for automated database deployment
US8255899B2 (en)Techniques for upgrade dependency management
US20060288344A1 (en)Method and apparatus for upgrading a software application in the presence of user modifications
US11055078B2 (en)Systems and methods for deploying software products to environments
CN112100194A (en)Database version management method and system
CN114816470B (en) Metadatabase management method, device, electronic device and medium
US20220043774A1 (en)Systems, methods, and storage media for transferring data files
CN116226092B (en)Database updating method and device
US11099837B2 (en)Providing build avoidance without requiring local source code
CN111737227A (en)Data modification method and system
US20230267103A1 (en)Database Schema Branching Workflow, with Support for Data, Keyspaces and VSchemas
CN102193841B (en)Backup method and device of Subversion configuration database
CN111897794A (en) Database maintenance method, device, electronic device and storage medium
US7257705B2 (en)Method for preserving changes made during a migration of a system's configuration to a second configuration
US9946534B1 (en)Techniques for automated database deployment
CN112835874B (en) Method, device and system for building primary and standby databases
CN111597165B (en)Database management method, terminal and storage medium
CN119225925A (en) Service management method, device, electronic device and storage medium
US20080172659A1 (en)Harmonizing a test file and test configuration in a revision control system
CN117971692A (en) Code submission method, electronic device, storage medium and program product
CN117873556A (en)Version management method, system, device, equipment and medium for chip verification
CN106547756B (en)Database creation method and device
Ross et al.SAP NetWeaver BI Accelerator
CN119004483B (en) A security configuration detection method, device, equipment and medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp