CN108427699B - Method, device and storage medium for quickly initializing system database - Google Patents

Method, device and storage medium for quickly initializing system database Download PDF

Info

Publication number
CN108427699B
CN108427699B CN201710868666.2A CN201710868666A CN108427699B CN 108427699 B CN108427699 B CN 108427699B CN 201710868666 A CN201710868666 A CN 201710868666A CN 108427699 B CN108427699 B CN 108427699B
Authority
CN
China
Prior art keywords
ddl
database
script
oracle
database table
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
CN201710868666.2A
Other languages
Chinese (zh)
Other versions
CN108427699A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710868666.2A priority Critical patent/CN108427699B/en
Priority to PCT/CN2018/077632 priority patent/WO2019056707A1/en
Publication of CN108427699A publication Critical patent/CN108427699A/en
Application granted granted Critical
Publication of CN108427699B publication Critical patent/CN108427699B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (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 invention provides a method for quickly initializing a system database, which is applied to an electronic device. The method comprises the following steps: scanning database table names corresponding to all DDL script files in a historical system database, and acquiring DDL script files with the same database table names; combining the acquired DDL script files with the same database table name into a DDL statement file according to a preset rule; and modifying the characteristic information of the combined DDL statement file to generate an initialization database script corresponding to the target system. The method improves the initialization efficiency of the database and reduces the data error rate. The invention also provides an electronic device and a computer readable storage medium.

Description

Method, device and storage medium for quickly initializing system database
Technical Field
The invention relates to the field of database management application, in particular to a method and a device for quickly initializing a system database.
Background
At present, the same type of system or a system with partial functions has similar business logic, which can also be understood as follows: the above system requires the same table structure to be created in different databases. For example, after a certain system a creates a certain time, more Database Definition Language (DDL) statements are compiled, and at this time, if another database of a system B with the same type or part of the same function is initialized, a developer needs to manually collect all DDL statements stored in the system a and respectively change their schema (owner), authorized user, and other information for the system B, which is large in workload and cumbersome to operate, and in addition, errors are very easy to occur in the manual operation process.
Disclosure of Invention
In view of the foregoing, there is a need for a method, an apparatus, and a computer-readable storage medium for quickly initializing a system database, which can collect DDL statements in a historical system database, classify and archive the DDL statements according to table names, and automatically change schema and authorized user information in the DDL statements by a system to generate an initialized database script corresponding to a target system, so that the method, the apparatus, and the computer-readable storage medium are more compact and reduce errors.
In order to achieve the above object, the present invention provides a method for quickly initializing a system database, which is applied to an electronic device, and the method includes:
scanning, namely scanning database table names corresponding to all DDL script files in a historical system database, and acquiring DDL script files with the same database table name;
a step of synthesizing, namely combining the acquired DDL script files with the same database table name into a DDL statement file according to a preset rule; and
and a generation step, namely modifying the characteristic information of the merged DDL statement file to generate an initialized database script corresponding to the target system.
Preferably, the DDL script file is named by DDL statements in a historical system database according to a preset naming rule.
Preferably, the preset naming rule is "submission number + operation type + owner + database table name".
Preferably, the step of synthesizing comprises:
sequencing, namely sequencing the DDL script files with the same database table name in an ascending order according to the submission numbers from small to large; and
and a merging step, merging the sequenced DDL script files into a DDL statement file.
Preferably, the generating step further comprises:
a receiving step, receiving modification instructions which are triggered by users and related to the information of the attribution persons and the information of the authorized users; and
and a modification step, namely modifying the affiliate information and the authorized user in the combined DDL statement file according to the modification instruction to obtain an initialized database script, so that the initialized database script corresponding to the target system has the same function as the historical system.
In addition, the present invention also provides an electronic device, including: a memory, a processor, and a fast initialization system database system stored on the memory and executable on the processor, the database initialization system being executed by the processor, the following steps being implemented:
scanning, namely scanning database table names corresponding to all DDL script files in a historical system database, and acquiring DDL script files with the same database table name;
a step of synthesizing, namely combining the acquired DDL script files with the same database table name into a DDL statement file according to a preset rule; and
and a generation step, namely modifying the characteristic information of the combined DDL statement file, and generating an initialization database script corresponding to the target system.
Preferably, the DDL script file is named by DDL statements in the history system according to a preset naming rule.
Preferably, the preset naming rule is "submission number + operation type + owner + database table name".
Preferably, the step of synthesizing comprises:
sequencing, namely sequencing the DDL script files with the same database table name in an ascending order according to the submission numbers from small to large; and
and a merging step, merging the sequenced DDL script files into a DDL statement file.
Preferably, the generating step further comprises:
a receiving step, receiving modification instructions which are triggered by users and related to the information of the attribution persons and the information of the authorized users; and
and a modification step, namely modifying the affiliate information and the authorized user in the combined DDL statement file according to the modification instruction to obtain an initialized database script, so that the initialized database script corresponding to the target system has the same function as the historical system.
In addition, the present invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a fast initialization system database system, and the fast initialization system database system is executed by a processor, and the following steps can be implemented:
scanning, namely scanning database table names corresponding to all DDL script files in a historical system database, and acquiring DDL script files with the same database table name;
a step of synthesizing, namely combining the acquired DDL script files with the same database table name into a DDL statement file according to a preset rule; and
and a generation step, namely modifying the characteristic information of the combined DDL statement file, and generating an initialization database script corresponding to the target system.
Preferably, the DDL script file is named by DDL statements in the history system according to a preset naming rule.
Preferably, the preset naming rule is "submission number + operation type + owner + database table name".
Preferably, the step of synthesizing comprises:
sequencing, namely sequencing the DDL script files with the same database table name in an ascending order according to the submission numbers from small to large; and
and a merging step, merging the sequenced DDL script files into a DDL statement file.
Preferably, the generating step further comprises:
a receiving step, receiving modification instructions which are triggered by users and related to the information of the attribution persons and the information of the authorized users; and
and a modification step, namely modifying the affiliate information and the authorized user in the combined DDL statement file according to the modification instruction to obtain an initialized database script, so that the initialized database script corresponding to the target system has the same function as the historical system.
The method, the device and the computer readable storage medium for quickly initializing the system database acquire DDL script files with the same database table name by scanning the database table names corresponding to all DDL script files in a historical system database, merge the DDL script files with the same database table name into a DDL statement file according to the submitted number from small to large, and then modify the attribution information and the authorized user in the merged DDL statement file according to a modification instruction triggered by a target system and aiming at the attribution information and the authorized user information, so as to acquire the initialized database script, so that the target system has the same function corresponding to the initialized database script as the historical system, the initialization efficiency of the database is improved, and the data error rate is reduced.
Drawings
FIG. 1 is a diagram of an application environment of an electronic device according to a preferred embodiment of the invention.
FIG. 2 is a diagram of the electronic device of FIG. 1 according to a preferred embodiment.
Fig. 3 is a block diagram of a preferred embodiment of the database system of the fast initialization system installed in the electronic device of fig. 1 and 2.
FIG. 4 is a flowchart illustrating a method for quickly initializing a system database according to a preferred embodiment of the present invention.
Fig. 5 is a detailed flowchart of step S120 in fig. 4.
Fig. 6 is a detailed flowchart of step S130 in fig. 4.
Detailed Description
Fig. 1 is a diagram illustrating an application environment of an electronic device 1 according to a preferred embodiment of the invention. The fast initialization system database system 10 is applied to the electronic apparatus 1. The electronic device 1 is connected to a plurality of clients 3 via a network 2. The network 2 may be a local area network, a wide area network, a metropolitan area network, or the like, and may be a wired network or a wireless network. The client 3 may be a desktop computer, a notebook, a tablet computer, a mobile phone, or other terminal devices that can communicate with the electronic device 1 through the network 2.
Fig. 2 is a schematic diagram of the electronic device 1 in fig. 1 according to a preferred embodiment. The electronic device 1 includes, but is not limited to, a memory 11, a processor 12, and a fast initialization system database system 10 stored on the memory 11 and operable on the processor 12. The electronic device 1 is in communication connection with a history system database 3 and a target system database 4. In the present embodiment, the history system database 3 stores history DDL statements.
The memory 11 stores program codes for fast initializing the system database system 10, and the memory 11 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like.
The processor 12 reads and executes the program code for the fast initialization of the system database system 10 from the memory 11, providing the following functions for the fast initialization of the system database system 10. Fig. 2 only shows the electronic device 1 with components 10-12, it being understood that the electronic device 1 may comprise more or less components.
Further, the fast initialization system database system 10 may also transmit the generated initialization database script to the target system database 4 via the network 2.
Fig. 3 is a block diagram of a preferred embodiment of the system for quickly initializing database system 10 installed in the electronic device 1 of fig. 1 and 2.
In one embodiment, the fast initialization system database system 10 includes a scanning module 110, a composition module 120, and a generation module 130.
The scanning module 110 scans the database table names corresponding to all the DDL script files in the historical system database 3 to obtain the DDL script files with the same database table name. The DDL script file naming rule in the history system is SRXXXX _ operation _ schema _ table. For example, the scanning module 110 scans all DDL script files in the historical system database 3, and names all DDL script files according to the naming rule of "submission number + operation type + owner + database table name": "001 _ Oracle _ liuyuun _ Region, 002_ Oracle _ liuyuun _ Soext, 003_ Oracle _ liuyuun _ Soext, 004_ Oracle _ liuyuun _ Salesorder, 005_ Oracle _ liuyuun _ Soext, 006_ Oracle _ liuyuun _ Salesorder, 007_ Oracle _ liuyuun _ Region … …"; the database table names scanned by the scanning module 110 are Region, salesor and Soext, respectively.
The synthesis module 120 combines the obtained DDL script files with the same database table name into a DDL statement file according to a preset rule.
In this embodiment, the synthesis module 120 includes: a sorting unit 121 and a merging unit 122.
The sorting unit 121 sorts the DDL script files of the same database table name in ascending order according to the submission numbers from small to large. For example: the sorting unit 121 sorts DDL script files with a database table name "Region" in ascending order from small to large according to the commit numbers, which are "001 _ Oracle _ liuyuun _ Region, 007_ Oracle _ liuyuun _ Region … …", respectively; the sorting unit 121 sorts DDL script files with database table name "salesder" in ascending order from small to large according to the commit numbers, which are respectively "004 _ Oracle _ liuyuun _ salesder, 006_ Oracle _ liuyuun _ salesder … …"; the sorting unit 121 sorts the DDL script files with the database table name "Soext" in ascending order from small to large according to the commit numbers, which are "002 _ Oracle _ liuyuun _ Soext, 003_ Oracle _ liuyuun _ Soext, and 005_ Oracle _ liuyuun _ Soext … …", respectively.
The merging unit 122 merges the sorted DDL script files into one DDL statement file. For example, the merge unit 122 merges the files "001 _ Oracle _ liuyuun _ Region, 007_ Oracle _ liuyuun _ Region … …" with the database table name "Region" in order into one DDL statement file; the merge unit 122 merges the database table name "Salesorder" ordered file "004 _ Oracle _ liuyuun _ Salesorder, 006_ Oracle _ liuyuun _ Salesorder … …" into one DDL statement file; the merge unit 122 merges the "002 _ Oracle _ liuyuun _ Soext, 003_ Oracle _ liuyuun _ Soext, 005_ Oracle _ liuyuun _ Soext … …" ordered files with the database table name "Soext" into one DDL statement file.
The generating module 130 modifies the feature information of the merged DDL statement file to generate an initialized database script corresponding to the target system.
In this embodiment, the generating module 130 includes a receiving unit 131 and a modifying unit 132.
The receiving unit 131 receives a modification instruction triggered by a user regarding the owner information and the authorized user information. For example, the receiving unit 131 receives an instruction for the user to change the owner information and the authorized user information from liuyun to wujin.
The modifying unit 132 modifies the affiliate information and authorized user in the combined DDL statement file according to the modifying instruction, so as to obtain the initialized database script. For example, if the modification unit 132 modifies the attribution information and authorized user information in the DDL statement file stored in the memory 11 from liuyun to wujin according to the modification instruction, the attribution information and authorized user information of the DDL script file in the generated DDL statement file are also modified from liuyun to wujin. For example, the modification unit 132 modifies "001 _ Oracle _ liuyuun _ Region, 007_ Oracle _ liuyuun _ Region … …" into "001 _ Oracle _ wujin _ Region, 007_ Oracle _ wujin _ Region … …", the modification unit 132 modifies "004 _ Oracle _ liuyuun _ salesder, 006_ Oracle _ liuyuun _ salesder … …" into "004 _ Oracle _ wujin _ salesder, 006_ Oracle _ wujin _ salesder … …", the modification unit 132 modifies "002 _ Oracle _ liuun _ Soext, 003_ Oracle _ liuun _ Soext, 005_ Oracle _ liuun _ Soext … …" 002_ Oracle _ liont, 003_ Oracle _ liuun _ Soext, and "002 _ Oracle _ lione _ soap", and "sajde _ soap, sajd _ Oracle _ soap, sajdentity _ saxist, and" generate Oracle _ database … ….
FIG. 4 is a flow chart of a preferred embodiment of the database initialization method of the present invention.
In step S110, the scanning module 110 scans database table names corresponding to all DDL script files in the historical system database 3 through the network 2, and obtains DDL script files with the same database table name. The naming rule of all DDL script files in the history system is SRXXXX _ operation _ schema _ table.sql, wherein SRXXXX represents a submission number, and the larger the number is, the later the submission time is; operation represents the operation type; schema represents a belonger; the table represents the database table name. For example, the scanning module 110 scans all DDL script files in the historical system database 3, and names all DDL script files according to the naming rule of "commit number + operation type + home + database table name", which are "001 _ Oracle _ liuyuun _ Region," 002_ Oracle _ liuyuun _ Soext, "003 _ Oracle _ liuyuun _ Soext," 004_ Oracle _ liuyuun _ salesor, "005 _ Oracle _ liuyuun _ Soext," 006_ Oracle _ liuyuun _ salesor, "007 _ Oracle _ liuyuun _ Region … …," respectively. The database table names scanned by the data scanning module 110 are respectively Region, salesor and Soext.
Step S120, the synthesis module 120 combines the obtained DDL script files with the same database table name into a DDL statement file according to a preset rule. For example: the composition module 120 merges the files "001 _ Oracle _ liuyuun _ Region, 007_ Oracle _ liuyuun _ Region … …" with the database table name "Region" into one DDL statement file according to a preset rule. The composition module 120 merges the files "004 _ Oracle _ liuyuun _ saleorder, 006_ Oracle _ liuyuun _ saleorder … …" with the database table name "saleorder" into one DDL statement file according to preset rules. The composition module 120 merges the files "002 _ Oracle _ liuyuun _ Soext, 003_ Oracle _ liuyuun _ Soext, 005_ Oracle _ liuyuun _ Soext … …" with the database table name "Soext" into one DDL statement file according to a preset rule.
Step S130, the generating module 130 generates the initialized database script corresponding to the target system according to the feature information of the modified and merged DDL statement file. For example: the generation module 130 modifies "001 _ Oracle _ liuyuun _ Region, 007_ Oracle _ liuyuun _ Region … …" into "001 _ Oracle _ wujin _ Region, 007_ Oracle _ wujin _ Region … …", the generation module 130 modifies "004 _ Oracle _ liuun _ salt order, 006_ Oracle _ liuyuun _ salt order … …", the generation module 130 modifies "002 _ Oracle _ liuyuun _ script, 003_ Oracle _ uliun _ Soext, 005_ Oracle _ lioxt … …", and the generation module 130 modifies "002 _ Oracle _ liuun _ script, 003_ Oracle _ solid _ Soext, 002_ Oracle _ soap _ text … …", and "002 _ Oracle _ lione _ text, and" saxijet _ database … … ", thereby generating the data.
As shown in fig. 5, is a detailed flowchart of step S120 in fig. 4.
In step S121, the sorting unit 121 sorts the DDL script files with the same database table name in ascending order according to the submission numbers from small to large. For example: the sorting unit 121 sorts DDL script files having a database table name "Region" in ascending order from small to large according to the commit numbers, "001 _ Oracle _ liuyuun _ Region, 007_ Oracle _ liuyuun _ Region … …", respectively. The sorting unit 121 sorts DDL script files having database table names "salesder" in ascending order from small to large according to the filing numbers, "004 _ Oracle _ liuyuun _ salesder, 006_ Oracle _ liuyuun _ salesder … …", respectively. The sorting unit 121 sorts the DDL script files having the database table name "Soext" in ascending order from small to large according to the commit numbers, which are "002 _ Oracle _ liuyuun _ Soext, 003_ Oracle _ liuyuun _ Soext, and 005_ Oracle _ liuyuun _ Soext … …", respectively.
In step S122, the merging unit 122 merges the sequenced DDL script files into a DDL statement file. For example: the merge unit 122 merges the files "001 _ Oracle _ liuyuun _ Region, 007_ Oracle _ liuyuun _ Region … …" with the database table name "Region" in order into one DDL statement file. The merge unit 122 merges the database table names "Salesorder" ordered file "004 _ Oracle _ liuyuun _ Salesorder, 006_ Oracle _ liuyuun _ Salesorder … …" into one DDL statement file. The merge unit 122 merges the "002 _ Oracle _ liuyuun _ Soext, 003_ Oracle _ liuyuun _ Soext, 005_ Oracle _ liuyuun _ Soext … …" ordered files with the database table name "Soext" into one DDL statement file.
As shown in fig. 6, is a detailed flowchart of step S130 in fig. 4.
In step S131, the receiving unit 131 receives a modification instruction triggered by the user regarding the owner information and the authorized user information. For example: the receiving unit 131 receives an instruction that the user modifies the owner information and the authorized user information from liuyuun to wujin, and sends the instruction to the modifying unit 132 for processing.
Step S132, the modifying unit 132 modifies the affiliate information and authorized user in the combined DDL statement file according to the modifying instruction, so as to obtain the initialized database script. For example: the modifying unit 132 modifies the attribution information and authorized user information in the DDL statement file stored in the memory 11 from liuyun to wujin, and then the attribution information and authorized user information in the DDL script file in the generated DDL statement file are also modified from liuyun to wujin. For example: the modification unit 132 modifies "001 _ Oracle _ liuyuun _ Region, 007_ Oracle _ liuyuun _ Region … …" into "001 _ Oracle _ wujin _ Region, 007_ Oracle _ wujin _ Region … …", the modification unit 132 modifies "004 _ Oracle _ liuun _ salt order, 006_ Oracle _ liuyuun _ salt order … …", the modification unit 132 modifies "002 _ Oracle _ liuyuun _ script, 003_ Oracle _ uliun _ Soext, 005_ Oracle _ lioxt, … …" 002_ Oracle _ liuun _ script, 003_ Oracle _ wu _ Soext, … … ", and generates Oracle _ wuun _ data.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a fast initialization system database system 10, and when executed by a processor, the fast initialization system database system 10 implements the following operations:
scanning, namely scanning database table names corresponding to all DDL script files in a historical system database, and acquiring DDL script files with the same database table name;
a step of synthesizing, namely combining the acquired DDL script files with the same database table name into a DDL statement file according to a preset rule; and
and a generation step, namely modifying the characteristic information of the merged DDL statement file to generate an initialized database script corresponding to the target system.
Preferably, the DDL script file is named by DDL statements in a historical system database according to a preset naming rule.
Preferably, the preset naming rule is "submission number + operation type + owner + database table name".
Preferably, the step of synthesizing comprises:
sequencing, namely sequencing the DDL script files with the same database table name in an ascending order according to the submission numbers from small to large; and
and a merging step, merging the sequenced DDL script files into a DDL statement file.
Preferably, the generating step further comprises:
a receiving step, receiving modification instructions which are triggered by users and related to the information of the attribution persons and the information of the authorized users; and
and a modification step, namely modifying the affiliate information and the authorized user in the combined DDL statement file according to the modification instruction to obtain an initialized database script, so that the initialized database script corresponding to the target system has the same function as the historical system.
The specific implementation of the computer readable storage medium of the present invention is substantially the same as the above-mentioned specific implementation of the method for quickly initializing the system database, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. 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 (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for fast initialization of a system database, the method comprising:
scanning, namely scanning database table names corresponding to all DDL script files in a historical system database, and acquiring DDL script files with the same database table name;
a step of synthesizing, namely combining the acquired DDL script files with the same database table name into a DDL statement file according to a preset rule; and
a generation step, namely modifying the characteristic information of the combined DDL statement file to generate an initialized database script corresponding to a target system;
the generating step further comprises:
a receiving step, receiving modification instructions which are triggered by users and related to the information of the attribution persons and the information of the authorized users; and
and a modification step, namely modifying the affiliate information and the authorized user in the combined DDL statement file according to the modification instruction to obtain an initialized database script, so that the initialized database script corresponding to the target system has the same function as the historical system.
2. The method for rapidly initializing a system database as claimed in claim 1, wherein the DDL script file is named by DDL statements in the historical system database according to a preset naming rule.
3. The method for rapidly initializing a system database as claimed in claim 2, wherein the preset naming rule is "commit number + operation type + home + database table name".
4. The method for rapidly initializing a system database as recited in claim 1 wherein the step of synthesizing comprises:
sequencing, namely sequencing the DDL script files with the same database table name in an ascending order according to the submission numbers from small to large; and
and a merging step, merging the sequenced DDL script files into a DDL statement file.
5. An electronic device comprising a memory, a processor, and a fast-initialization system database system stored on the memory and operable on the processor, the fast-initialization system database system being executable by the processor, the steps comprising:
scanning, namely scanning database table names corresponding to all DDL script files in a historical system database, and acquiring DDL script files with the same database table name;
a step of synthesizing, namely combining the acquired DDL script files with the same database table name into a DDL statement file according to a preset rule; and
a generation step, namely modifying the characteristic information of the combined DDL statement file to generate an initialized database script corresponding to a target system;
the generating step includes:
a receiving step, receiving modification instructions which are triggered by users and related to the information of the attribution persons and the information of the authorized users; and
and a modification step, namely modifying the affiliate information and the authorized user in the combined DDL statement file according to the modification instruction to obtain an initialized database script, so that the initialized database script corresponding to the target system has the same function as the historical system.
6. The electronic device of claim 5, wherein the DDL script file is named by a DDL statement in a historical system database according to a naming rule of 'submit number + operation type + home + database table name'.
7. The electronic device of claim 5, wherein the synthesizing step comprises:
sequencing, namely sequencing the DDL script files with the same database table name in an ascending order according to the submission numbers from small to large; and
and a merging step, merging the sequenced DDL script files into a DDL statement file.
8. A computer-readable storage medium having stored thereon a fast initialization system database system, the fast initialization system database system being executable by a processor, the method for fast initialization of a system database as recited in any one of claims 1-4 being implemented.
CN201710868666.2A 2017-09-22 2017-09-22 Method, device and storage medium for quickly initializing system database Active CN108427699B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710868666.2A CN108427699B (en) 2017-09-22 2017-09-22 Method, device and storage medium for quickly initializing system database
PCT/CN2018/077632 WO2019056707A1 (en) 2017-09-22 2018-02-28 Method and device for quickly initializing system database and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710868666.2A CN108427699B (en) 2017-09-22 2017-09-22 Method, device and storage medium for quickly initializing system database

Publications (2)

Publication Number Publication Date
CN108427699A CN108427699A (en) 2018-08-21
CN108427699B true CN108427699B (en) 2021-08-24

Family

ID=63155626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710868666.2A Active CN108427699B (en) 2017-09-22 2017-09-22 Method, device and storage medium for quickly initializing system database

Country Status (2)

Country Link
CN (1) CN108427699B (en)
WO (1) WO2019056707A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861969B (en) * 2017-09-14 2020-10-02 平安普惠企业管理有限公司 Statement modification method, scanning platform and computer-readable storage medium
CN109325046A (en) * 2018-10-25 2019-02-12 深圳壹账通智能科技有限公司 Database script generation method, device, medium and electronic equipment
CN109753490A (en) * 2018-12-13 2019-05-14 深圳壹账通智能科技有限公司 Database optimizing method, system, equipment and medium based on loophole reparation
CN110633284B (en) * 2019-09-19 2022-04-29 中国工商银行股份有限公司 Method and device for changing table in database
CN110968569B (en) * 2019-12-19 2023-12-29 广州品唯软件有限公司 Database management method, database management device, and storage medium
CN111737227B (en) * 2020-06-22 2024-04-02 平安健康保险股份有限公司 Data modification method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737020A (en) * 2011-03-31 2012-10-17 国际商业机器公司 Method for initializing multi-tenant database, and apparatus thereof
CN102929878A (en) * 2011-08-09 2013-02-13 阿里巴巴集团控股有限公司 Method and device for managing database changes
CN104965735A (en) * 2015-06-18 2015-10-07 北京京东尚科信息技术有限公司 Apparatus for generating upgrade SQL script
CN105205053A (en) * 2014-05-30 2015-12-30 阿里巴巴集团控股有限公司 Method and system for analyzing database incremental logs
JP2016057722A (en) * 2014-09-08 2016-04-21 株式会社日立製作所 DML retrieval device
CN106776997A (en) * 2016-12-02 2017-05-31 国家电网公司 A kind of moving method of database

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9582558B2 (en) * 2008-06-02 2017-02-28 Sybase, Inc. Method and system for data definition language (DDL) replication
CN102279886B (en) * 2011-08-16 2012-10-17 中国民生银行股份有限公司 Method and equipment for processing metadata
US9305070B2 (en) * 2012-12-31 2016-04-05 Sybase, Inc. Continuous change data capture without disruption of DDL
CN105630783A (en) * 2014-10-27 2016-06-01 青岛金讯网络工程有限公司 Database data migration system
CN105260403B (en) * 2015-09-22 2019-05-31 同望科技股份有限公司 General integration across database access method
CN106991104B (en) * 2016-01-21 2020-03-17 泰康保险集团股份有限公司 Database script deployment device and database script deployment method
CN107025249A (en) * 2016-02-02 2017-08-08 上海格尔软件股份有限公司 A kind of method of quick support synchronizing multiple databases exploitation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102737020A (en) * 2011-03-31 2012-10-17 国际商业机器公司 Method for initializing multi-tenant database, and apparatus thereof
CN102929878A (en) * 2011-08-09 2013-02-13 阿里巴巴集团控股有限公司 Method and device for managing database changes
CN105205053A (en) * 2014-05-30 2015-12-30 阿里巴巴集团控股有限公司 Method and system for analyzing database incremental logs
JP2016057722A (en) * 2014-09-08 2016-04-21 株式会社日立製作所 DML retrieval device
CN104965735A (en) * 2015-06-18 2015-10-07 北京京东尚科信息技术有限公司 Apparatus for generating upgrade SQL script
CN106776997A (en) * 2016-12-02 2017-05-31 国家电网公司 A kind of moving method of database

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Site Initialization, Recovery, and Backup in a;RONY ATTAR等;《IEEE TRANSACTIONS ON SOFTWARE ENGINEERING》;19841130;第10卷(第6期);第645-650页 *
基于Android的数据库初始化方案的研究与应用;王飞等;《现代计算机(专业版)》;20120531;第55-58页 *

Also Published As

Publication number Publication date
WO2019056707A1 (en) 2019-03-28
CN108427699A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
CN108427699B (en) Method, device and storage medium for quickly initializing system database
CN108090064B (en) Data query method and device, data storage server and system
CN110427368B (en) Data processing method and device, electronic equipment and storage medium
CN108416679B (en) Device and method for issuing orders of multiple insurance products and computer readable storage medium
CN111443912B (en) Component-based page rendering method, device, computer equipment and storage medium
US20140367461A1 (en) Quick response in software applications
CN113364853B (en) Business service system, business request method and gateway equipment
KR20150011404A (en) Systems and methods for software upgrade recommendation
CN107656729B (en) List view updating apparatus, method and computer-readable storage medium
CN104834660B (en) Fuzzy data library searching based on section
CN110249312B (en) Method and system for converting data integration jobs from a source framework to a target framework
CN112000692B (en) Page query feedback method and device, computer equipment and readable storage medium
US9842307B2 (en) Methods and systems for creating tasks
CN115455925A (en) Contract generation method and device, electronic equipment and storage medium
KR20170073693A (en) Extracting similar group elements
CN111723077A (en) Data dictionary maintenance method and device and computer equipment
CN111078437B (en) Remote calling method and device for verification codes, electronic equipment and readable storage medium
CN110866007B (en) Information management method, system and computer equipment for big data application and table
US12001458B2 (en) Multi-cloud object store access
US8224822B2 (en) Template based entity transformation
US20230049322A1 (en) Information processing method, device, system, and computer-readable storage medium
CN112583761B (en) Management method and device of security entity, computer equipment and storage medium
CN113448980A (en) Method and device for generating SQL (structured query language) statement and electronic equipment
CN113435847A (en) Information display method and device, electronic equipment and storage medium
CN113051299A (en) Proxy information processing method, proxy information processing device, computer equipment and 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
GR01 Patent grant
GR01 Patent grant