CN111427889A - Method and device for upgrading database table and server - Google Patents

Method and device for upgrading database table and server Download PDF

Info

Publication number
CN111427889A
CN111427889A CN202010210389.8A CN202010210389A CN111427889A CN 111427889 A CN111427889 A CN 111427889A CN 202010210389 A CN202010210389 A CN 202010210389A CN 111427889 A CN111427889 A CN 111427889A
Authority
CN
China
Prior art keywords
database table
new version
batches
version database
data
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
CN202010210389.8A
Other languages
Chinese (zh)
Inventor
郭志鸣
时杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Century TAL Education Technology Co Ltd
Original Assignee
Beijing Three Body Cloud Times Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Three Body Cloud Times Technology Co ltd filed Critical Beijing Three Body Cloud Times Technology Co ltd
Priority to CN202010210389.8A priority Critical patent/CN111427889A/en
Publication of CN111427889A publication Critical patent/CN111427889A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The invention provides a method, a device and a server for upgrading a database table, and relates to the technical field of computers, wherein the method is applied to a server cluster, each server in the server cluster corresponds to a database, and the servers in the server cluster are divided into a plurality of batches; the method comprises the following steps: determining a new version database table aiming at the new version software, wherein the new version database table has a data clearing attribute; after all batches determine the new version database table, writing data in the new version database table of each batch in the multiple batches in sequence; and after the data of the new version database tables of all the batches are written, sequentially replacing the old version database table in use of each batch in the plurality of batches with the new version database table. The invention can effectively improve the data connectivity of the old and new database tables in the software upgrading process and ensure the normal operation of the online program in the upgrading process.

Description

Method and device for upgrading database table and server
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device and a server for upgrading a database table.
Background
The database plays a very important role in the equipment, stores key information such as the current configuration of the equipment and the like, and the correctness of the key information directly influences whether the equipment normally operates. During the operation of the network device, the software version may need to be changed due to the addition of new functions or the repair of problems. In order to adapt to software of a new version, a database table is generally required to be upgraded, when the database table is upgraded, if the database table is incompatible and the data connectivity of the database table of the new version and the database table of the old version is poor, the configuration of a user is disordered, the reconfiguration is very tedious, time and energy are wasted, and if all servers are stopped for upgrading, the on-line program cannot run normally or run.
Disclosure of Invention
The invention aims to provide a method, a device and a server for upgrading a database table, which can effectively improve the data connectivity of a new database and an old database and ensure the normal operation of a line program in the upgrading process.
In a first aspect, an embodiment provides a database upgrading method, which is applied to a server cluster, wherein each server in the server cluster corresponds to a database, and the servers in the server cluster are divided into a plurality of batches; the method comprises the following steps: determining a new version database table for the new version software; the new version database table has a data clear attribute; after the servers of all batches determine the new version database table, sequentially writing data to the new version database table of each batch in the multiple batches; and after the data of the new version database tables of all the batches are written, sequentially replacing the old version database table in use of each batch in the plurality of batches with the new version database table.
In an optional embodiment, after the servers of all the batches determine the new version database table, the step of writing data to the new version database table of each batch in the multiple batches sequentially includes: after the servers of all batches determine the new version database table, writing data to the new version database table of each batch in a plurality of batches in sequence while reading and writing data in the old version database table; wherein, the old version database table is the database table used before upgrading.
In an optional embodiment, after the data is written in the new version database tables of all the batches, the step of sequentially replacing the old version database table in use of each batch in the plurality of batches with the new version database table includes: after the data of the new version database tables of all batches are written, reading and writing data of the new version database tables of each batch in a plurality of batches in sequence; and after the data is read and written in the new version database tables of all batches, replacing the old version database table with the new version database table.
In an optional embodiment, after reading and writing data in the new version database tables of all batches, the step of replacing the old version database table with the new version database table includes: after reading and writing data in the new version database tables of all batches, sequentially executing data clearing operation on the old version database tables of each batch in the plurality of batches; and when the old version database tables of all the batches execute the data clearing operation, replacing the old version database tables with the new version database tables.
In an alternative embodiment, after replacing the old version database tables in use for each of the plurality of batches with the new version database tables, the method further comprises: the old version database table is deleted.
In an alternative embodiment, the new version database tables are database tables that differ in table name and table structure from the old version database tables.
In a second aspect, an embodiment provides a database upgrading device, where the device is applied to a server cluster, each server in the server cluster corresponds to a database, and the servers in the server cluster are divided into multiple batches; the device comprises: the new database table determining module is used for determining a new version database table aiming at the new version software; the new version database table has a data clear attribute; the data writing module is used for sequentially writing data to the new version database table of each batch in the multiple batches after the servers of all batches determine the new version database table; and the upgrading module is used for sequentially replacing the old version database table in use of each batch in the plurality of batches with the new version database table after the data of the new version database tables of all batches are written.
In an optional embodiment, the data writing module is configured to, after all batches of servers determine the new version database table, sequentially write data to the new version database table of each batch of the multiple batches while reading and writing data in the old version database table; wherein, the old version database table is the database table used before upgrading.
In a third aspect, an embodiment provides a server, including a memory and a processor; the memory has stored thereon a computer program which, when executed by the processor, performs the method of any of the preceding embodiments.
In a fourth aspect, embodiments provide a computer readable storage medium for storing computer software instructions for a method according to any one of the preceding embodiments.
The invention provides a method, a device and a server for upgrading a database table, which are applied to a server cluster, wherein each server in the server cluster corresponds to a database, and the servers in the server cluster are divided into a plurality of batches, and the method comprises the following steps: and determining a new version database table for the new version software, wherein the new version database table has a data clearing attribute, writing data in the new version database table of each batch in the multiple batches sequentially after the servers of all batches determine the new version database table, and replacing the old version database table in use of each batch in the multiple batches with the new version database table sequentially after the data is written in the new version database table of all batches. According to the method, the database table is upgraded in batches, so that the database table can be updated downward in a compatible manner in the software upgrading process under the condition that the old version software is normally used, the problem of poor data connectivity of the new version software and the old version software caused by directly converting the database is avoided, the data connectivity of the new version database table and the old version database table in the software upgrading process is effectively improved, and normal running or operation of a thread program in the upgrading process is guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a method for upgrading a database table according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another method for upgrading a database table according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for upgrading a database table according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server 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. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the 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.
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, it need not be further defined and explained in subsequent figures.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Considering that when upgrading the database, if the new and old databases have poor data connectivity, the databases are incompatible, thereby causing disorder of configuration for users, making a new configuration is tedious, time and energy are wasted, and if all servers are stopped for upgrading, normal operation and running of the online program are affected. To solve the problem, embodiments of the present invention provide a method, an apparatus, and a server for upgrading a database table, which can effectively improve data connectivity of new and old databases and ensure normal operation and running of an online program in an upgrading process.
Example 1
For convenience of understanding, first, a method for upgrading a database table provided by an embodiment of the present invention is described in detail, referring to a schematic flow chart of the method for upgrading a database table shown in fig. 1, where the method is applied to a server cluster, and each server in the server cluster corresponds to a database, and the method mainly includes the following steps S102 to S106:
step S102: determining a new version database table for the new version software; the new version database table has a data purge attribute.
In one embodiment, the server cluster may be in communication with a controller through which the servers in the server cluster are controlled. In order to ensure that the software of the new and old versions can normally run simultaneously in the software upgrading process, that is, the software of the new and old versions needs to exchange data at any time, the embodiment divides the servers in the server cluster into a plurality of batches, and sequentially executes the upgrading operation on the servers of each batch. Since the last service for specifying the new and old versions of software deletes the content in the database table from the shared task when sharing data, it is necessary to ensure that the new version database table has the data clearing attribute.
The method comprises the steps of firstly determining a new version database table aiming at new version software, wherein the new version database table is a database table with a table name and a table structure different from those of an old version database table and is used for carrying out data exchange aiming at users of the new version software. In one embodiment, both the intersection and complement may be included between the old and new database tables, i.e., the old and new database tables may have partially identical fields. In another embodiment, there may be no complement between the old and new database tables, i.e., the fields of the old and new database tables are all different. In practical applications, the method can be implemented according to specific situations, and is not particularly limited herein.
Step S104: and when the servers of all the batches determine the new version database table, sequentially writing data to the new version database table of each batch in the plurality of batches.
In one embodiment, after all batches of servers determine the new version database table, the software still uses the old version database table to read and write data during running, but the new version database table also starts to write data to the new version database table in batches. Because the number of servers in the server cluster is usually huge, in this embodiment, the running data is written into each new version database table corresponding to each batch of servers in sequence, and after the running data is written into all the new version database tables of the current batch, the running data is written into the new version database tables of the next batch until all the new version database tables are written into the running data.
It will be appreciated that the new version database tables for all batches for which data was written at this time still have the property of data clean-up. Therefore, when the user shares data, in order to avoid the existence of junk data after the sharing is finished, the data is deleted by the last quitted new version database table. For the convenience of understanding, taking the chat software as an example, after a plurality of people finish chatting and quit the chat room, the database table corresponding to the chat software of the last user of the quitting room executes data cleaning work, so as to ensure that no junk data is left in the chat room after the chatting is finished.
Step S106: and after the data of the new version database tables of all the batches are written, sequentially replacing the old version database table in use of each batch in the plurality of batches with the new version database table.
In one embodiment, after all batches of new version database tables are written with data, the software read-write data are read and written according to the used old version database table, and in order to ensure that the data in the upgrading process are downward compatible, the software read-write data are sequentially read and written for the new version database table of each batch, so that the used old version database table is sequentially replaced by the new version database table. The used old version database refers to the fact that the old version database is adopted for reading and writing, the old version database is replaced by the new version database in sequence according to batches, the replacement refers to the fact that the old version database table is replaced by the new version database table, namely the read-write data uses the new version database table. And replacing the old version database for both reading and writing operations with the new version database for both reading and writing operations until all batches of databases are replaced, and upgrading the databases.
In addition, because the process of software interaction between the new version and the old version exists in the practical application, that is, during data exchange, the software versions used by users are not all the latest versions, therefore, after the new version database is adopted in the reading and writing operations, the old version database needs to perform the data writing operation, thereby ensuring that users with different software versions can perform interaction.
The database upgrading method provided by the invention has the advantages that the new version database table aiming at the new version software is determined, the new version database table has the data clearing attribute, when the new version database tables are established in all batches of databases, the data is written into the new version database table of each batch in a plurality of batches in sequence, and after the data is written into the new version database tables of all batches, the old version database table in use in each batch in the plurality of batches is replaced with the new version database table in sequence. According to the method, the database table is upgraded in batches, so that the database table can be updated downward compatibly in the software upgrading process under the condition that the old version software is normally used, the problem of poor data connectivity of the new version software and the old version software caused by directly converting the database is solved, the data connectivity of the new version database table and the old version database table in the software upgrading process is effectively improved, and the normal operation or running of an online program is not influenced. Therefore, the embodiment of the invention effectively improves the data connectivity of the old and new database tables in the software upgrading process and ensures the normal operation of the online program in the upgrading process.
Example 2
In this embodiment, for convenience of understanding, a detailed description is given by taking 3 servers, a database of a software version corresponding to each server, and a software version of a database upgraded in each batch as examples, referring to another flow diagram of a method for upgrading a database table shown in fig. 2, where a bidirectional arrow in the diagram is a read-write operation, a unidirectional arrow is a write operation, and a dashed arrow is a clear data operation. The old version database table is a table A (namely TA in the figure), the new version database table is a table B (namely TB in the figure), the 1 st version is the software of the 1 st version, the software version is the version before upgrading, and the 2 nd version, the 3 rd version, the 4 th version and the 5 th version are the new version software corresponding to each round of upgrading operation.
The database table used by the software of the initial version (version 1) is the database table of the old version TA, and the reading and writing operations of the software of the initial version are all on the TA. Because the TA cannot meet the requirement of the upgraded version of the software, a new version database table TB for the new version software needs to be determined, wherein the TB is a database table with a table name and a table structure different from those of the TA.
In the first round of upgrade process shown in fig. 2, when two software versions have been upgraded to the 2 nd version, the TA is still used for the 2 nd version software and the 1 st version software when reading and writing data, but the new version database table TB for the 2 nd version software already has the attribute of clearing data. When the first round of upgrading is completed completely, all software versions are version 2 software, the data operation state of the version 2 software on the database table is that A is used for deleting B, A is used for indicating that all data read-write is still on the old database table TA, and B is deleted for indicating that the new table TB has the attribute of clearing data, so that when the service of the new version and the old version shares data under the same data sharing environment, the last database table TB finishing the data sharing process clears the data, and the problem of residual junk data caused by the fact that the data cannot be cleared is solved.
And after the servers of each batch complete the first round of upgrading operation, executing a second round of upgrading, wherein the data read and written in the old database table TA are still the old database table, but the writing operation can be executed in batches for the new database table TB. At this point, version 3-1 and version 3-2 have performed data write operations to the TB, as shown in the figure, while still having the data scrubbing functionality described above for the new database table TB. And when all batches are subjected to write operation, ending the second round of upgrading process, wherein all software versions are 3 rd versions, and writing data through the TB while all the 3 rd version software reads and writes data by the TA. In this way it is ensured that a user using the old and new versions of software has data in the new data table TB when performing session control (delivery).
And when the data writing operation is completed in the new database tables TB of all batches, executing the third round of upgrading. At this time, both reading and writing data of the new version software (version 4 software) adopt a new database table TB, such as version 4-1 and version 4-2 shown in the figure, and at this time, version 4-1 and version 4-2 only perform data writing operation on TA, that is, write a operation with B. After the third upgrade operation is completed, all software versions are version 4, the read-write data of each version 4 software is written by the TB, and meanwhile, in order to meet the interaction between the software of the new version and the software of the old version, the software of each version 4 needs to write the old database table TA, so that data exchange can be ensured at any upgrade stage.
And entering a fourth upgrading process after all software versions read and write data by using the TB. At this time, version 4 and version 5 use TB to read and write data, but for version 5 software, TA is deleted, and when all software versions delete TA, the fourth upgrade is finished. The database table used at this time is a new database table TB, that is, data is read and written through the new database table TB. For the version 5 in use, delete a operation, that is, delete the old database table, may be performed, and a batch deletion method may also be employed. And finally, using the new database table TB to finish the upgrading of the database table.
According to the method for upgrading the database table, each round of upgrading operation is performed in batches, and the database table can be guaranteed to be updated downward in a compatible mode in the software upgrading process under the condition that the old version software is normally used, so that the data connectivity of the old database table and the new database table in the software upgrading process is effectively improved, and normal operation or running of a program on the line in the upgrading process is guaranteed.
Example 3
For the database upgrading method corresponding to embodiment 1, an embodiment of the present invention further provides a database upgrading device, referring to a schematic structural diagram of a database table upgrading device shown in fig. 3, where the device is applied to a server cluster, each server in the server cluster corresponds to a database, and servers in the server cluster are divided into multiple batches, where the device includes the following parts:
a new database table determination module 302, configured to determine a new version database table for the new version software; the new version database table has a data clear attribute;
the data writing module 304 is configured to write data to the new version database table of each batch in the multiple batches in sequence after the servers of all the batches determine the new version database table;
the updating module 306 is configured to, after the data is written in the new version database tables of all the batches, sequentially replace the old version database table in use of each of the multiple batches with the new version database table.
According to the database upgrading device provided by the invention, the device carries out database upgrading in batches, so that the new version database can be established under the condition that the old version software is normally used, and the problem of poor data connectivity of the new version software and the old version software caused by directly converting the database is avoided, so that the data connectivity of the new version database and the old version database is effectively improved, and the stability of database upgrading is further improved. Therefore, the embodiment of the invention can effectively improve the data connectivity of the new database and the old database and ensure the normal operation of the online program in the upgrading process.
In an embodiment, the data writing module 304 is further configured to, after all batches of servers determine the new version database table, sequentially write data to the new version database table of each batch of multiple batches while reading and writing data in the old version database table; wherein, the old version database table is the database table used before upgrading.
In an embodiment, the upgrading module 306 is further configured to, after all batches of the new version database tables are written with data, sequentially read and write data to the new version database tables of each batch of the multiple batches; and after the data is read and written in the new version database tables of all batches, replacing the old version database table with the new version database table.
In an embodiment, the upgrading module 306 is further configured to, after the read-write data is performed on the new version database tables of all the batches, sequentially perform a data clearing operation on the old version database table of each of the multiple batches; and when the old version database tables of all the batches execute the data clearing operation, replacing the old version database tables with the new version database tables.
In one embodiment, after replacing the old version database in use for each of the plurality of batches with the new version database, the apparatus further comprises: and the deleting module is used for deleting the old version database table.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
Example 4
The embodiment of the invention also provides a server, which specifically comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the above described embodiments.
Fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server 100 includes: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42; the processor 40 is arranged to execute executable modules, such as computer programs, stored in the memory 41.
The memory 41 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
The bus 42 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The memory 41 is used for storing a program, the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 40, or implemented by the processor 40.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 40. The Processor 40 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the method in combination with the hardware thereof.
The method, the apparatus, and the computer program product of the server for updating a database table provided in the embodiments of the present invention include a computer-readable storage medium storing a nonvolatile program code executable by a processor, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the method described in the foregoing method embodiments is executed.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system described above may refer to the corresponding process in the foregoing embodiments, and is not described herein again.
The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for upgrading a database table is characterized in that the method is applied to a server cluster, each server in the server cluster corresponds to a database, and the servers in the server cluster are divided into a plurality of batches; the method comprises the following steps:
determining a new version database table for the new version software; the new version database table has a data clearing attribute;
after the servers of all batches determine the new version database table, sequentially writing data to the new version database table of each batch in a plurality of batches;
and after the data of the new version database tables of all the batches are written, sequentially replacing the old version database table in use of each batch in the plurality of batches with the new version database table.
2. The method of claim 1, wherein the step of writing the new version database table of each of the plurality of batches in turn after the servers of all the batches determine the new version database table comprises:
after the servers of all batches determine the new version database table, sequentially writing data to the new version database table of each batch in a plurality of batches while reading and writing data in the old version database table; and the old version database table is a database table used before upgrading.
3. The method of claim 1, wherein the step of sequentially replacing the old version database tables in use for each of the plurality of batches with the new version database tables after the data writing is performed on the new version database tables of all the batches comprises:
after the data of the new version database tables of all batches are written, sequentially reading and writing data of the new version database tables of each batch in a plurality of batches;
and after the data reading and writing are carried out on the new version database tables of all batches, replacing the old version database table with the new version database table.
4. The method of claim 3, wherein the step of replacing the old version database table with the new version database table after the new version database tables of all batches have read and written data comprises:
after reading and writing data in the new version database tables of all batches, sequentially executing data clearing operation on the old version database tables of each batch in a plurality of batches;
and when the old version database tables of all batches execute data clearing operation, replacing the old version database tables with the new version database tables.
5. The method of claim 1, wherein after replacing the old version database tables in use for each of a plurality of batches with the new version database tables, the method further comprises:
deleting the old version database table.
6. The method of claim 1, wherein the new version database table is a database table that has a different table name and table structure than the old version database table.
7. A device for upgrading a database table is applied to a server cluster, each server in the server cluster corresponds to a database, and the servers in the server cluster are divided into a plurality of batches; the device comprises:
the new database table determining module is used for determining a new version database table aiming at the new version software; the new version database table has a data clearing attribute;
the data writing module is used for sequentially writing data to the new version database table of each batch in a plurality of batches after the servers of all batches determine the new version database table;
and the upgrading module is used for sequentially replacing the old version database table in use of each batch in a plurality of batches with the new version database table after the data of the new version database tables of all batches are written.
8. The apparatus of claim 7, wherein the write data module is configured to, after all batches of servers determine the new version database table, sequentially write data to the new version database table of each batch of multiple batches while reading and writing data from and to the old version database table; and the old version database table is a database table used before upgrading.
9. A server, comprising a memory and a processor;
the memory has stored thereon a computer program which, when executed by the processor, performs the method of any of claims 1 to 6.
10. A computer readable storage medium for storing computer software instructions for use in the method of any one of claims 1 to 6.
CN202010210389.8A 2020-03-23 2020-03-23 Method and device for upgrading database table and server Pending CN111427889A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010210389.8A CN111427889A (en) 2020-03-23 2020-03-23 Method and device for upgrading database table and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010210389.8A CN111427889A (en) 2020-03-23 2020-03-23 Method and device for upgrading database table and server

Publications (1)

Publication Number Publication Date
CN111427889A true CN111427889A (en) 2020-07-17

Family

ID=71548766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010210389.8A Pending CN111427889A (en) 2020-03-23 2020-03-23 Method and device for upgrading database table and server

Country Status (1)

Country Link
CN (1) CN111427889A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020036969A (en) * 2002-02-06 2002-05-17 (주) 세이프아이 Automatic Update System using online
CN103729204A (en) * 2012-10-16 2014-04-16 阿里巴巴集团控股有限公司 Data on-line migration method and device for updating applications in network platform
WO2015028538A1 (en) * 2013-09-02 2015-03-05 Agfa Healthcare A method and system for upgrading software
US20190050441A1 (en) * 2017-08-09 2019-02-14 Vmware, Inc. Event based analytics database synchronization
CN109446192A (en) * 2018-11-09 2019-03-08 贵州医渡云技术有限公司 Data test method and device
CN109981350A (en) * 2019-03-01 2019-07-05 畅捷通信息技术股份有限公司 A kind of continual upgrade method of cloud service and system
CN110049073A (en) * 2018-01-15 2019-07-23 华为技术有限公司 Method for upgrading software and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020036969A (en) * 2002-02-06 2002-05-17 (주) 세이프아이 Automatic Update System using online
CN103729204A (en) * 2012-10-16 2014-04-16 阿里巴巴集团控股有限公司 Data on-line migration method and device for updating applications in network platform
WO2015028538A1 (en) * 2013-09-02 2015-03-05 Agfa Healthcare A method and system for upgrading software
US20190050441A1 (en) * 2017-08-09 2019-02-14 Vmware, Inc. Event based analytics database synchronization
CN110049073A (en) * 2018-01-15 2019-07-23 华为技术有限公司 Method for upgrading software and system
CN109446192A (en) * 2018-11-09 2019-03-08 贵州医渡云技术有限公司 Data test method and device
CN109981350A (en) * 2019-03-01 2019-07-05 畅捷通信息技术股份有限公司 A kind of continual upgrade method of cloud service and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐红等: ""军卫一号"数据库升级设计与应用研究", 《医疗卫生装备》 *

Similar Documents

Publication Publication Date Title
US10437795B2 (en) Upgrading systems with changing constraints
CN108776587B (en) Data acquisition method and device, computer equipment and storage medium
CN103440198A (en) Method for calibrating form
CN111580939A (en) Method and device for hierarchical asynchronous transaction processing
CN105095425A (en) Cross-database transfer method and device for databases
CN112416972A (en) Real-time data stream processing method, device, equipment and readable storage medium
CN108734510B (en) Advertisement recommendation method and system based on attribute matching
US11237761B2 (en) Management of multiple physical function nonvolatile memory devices
CN107609011B (en) Database record maintenance method and device
CN112035230A (en) Method and device for generating task scheduling file and storage medium
CN109646947B (en) Game data storage method, device, equipment and storage medium
CN114356581A (en) Memory cleaning method and related equipment
CN111427889A (en) Method and device for upgrading database table and server
US20080275959A1 (en) Distributed Search in a Casual Network of Servers
CN113076086B (en) Metadata management system and method for modeling model object using the same
CN105550347B (en) Data processing method and device
CN113722321A (en) Data export method and device and electronic equipment
CN109739876B (en) Data query method and device for database based on Sqltoy-orm framework
CN114063880A (en) Method, electronic device and computer program product for processing input and output requests
CN110703988A (en) Storage pool creating method, system, terminal and storage medium for distributed storage
CN108140023B (en) Application icon management method and device and terminal
CN111078714B (en) Data processing method and device
CN115543485B (en) Data conversion configuration generation method, device, computer equipment and medium
CN113759859B (en) Online configuration comparison method and system for distributed control system
CN111831312B (en) Medical system updating method and device

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
TA01 Transfer of patent application right

Effective date of registration: 20210303

Address after: Room 1702-03, Lantian Hesheng building, 32 Zhongguancun Street, Haidian District, Beijing 100082

Applicant after: BEIJING CENTURY TAL EDUCATION TECHNOLOGY Co.,Ltd.

Address before: 102200 b5-005 maker Plaza, 338 Huilongguan East Street, Huilongguan town, Changping District, Beijing

Applicant before: Beijing three body cloud times Technology Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20200717

RJ01 Rejection of invention patent application after publication