CN117435635A - Database version query method and device - Google Patents

Database version query method and device Download PDF

Info

Publication number
CN117435635A
CN117435635A CN202310967813.7A CN202310967813A CN117435635A CN 117435635 A CN117435635 A CN 117435635A CN 202310967813 A CN202310967813 A CN 202310967813A CN 117435635 A CN117435635 A CN 117435635A
Authority
CN
China
Prior art keywords
database
version
information
version information
queried
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
CN202310967813.7A
Other languages
Chinese (zh)
Inventor
方骅
於维华
朱婷婷
赵安琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310967813.7A priority Critical patent/CN117435635A/en
Publication of CN117435635A publication Critical patent/CN117435635A/en
Pending legal-status Critical Current

Links

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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • 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/219Managing data history or versioning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a database version query method and a database version query device, which relate to the field of artificial intelligence and can be used in the field of software testing, wherein the method comprises the following steps: determining an object and each object type related to version information in a database to be queried; version information of each object is obtained through each object type; and determining the version information of the database to be queried according to the version information of each object. Therefore, the invention acquires the version-related object in the database to be queried and version-related information from the object, and because the version information of the database is updated, the program of the database is necessarily updated, and the version-related information acquired from the object can effectively illustrate the version condition, the accuracy of querying the version of the database can be improved by acquiring the version-related information of the object of the database to be queried.

Description

Database version query method and device
Technical Field
The invention relates to the field of artificial intelligence, in particular to the field of finance, which can be used in the field of software testing, in particular to a database version query method and a database version query device.
Background
The commercial bank test environment provides a system application environment necessary for verification before the product is on line, unstable software versions are frequently deployed in the test environment, wherein the database versions are typical software versions, and confirming the database versions of the test environment is helpful for determining whether the test environment has necessary program functional elements matched with test requirements.
The existing banking test environment has the following characteristics:
1) In order to ensure that the test environment approaches to the online, the test environment is imported after data desensitization is periodically acquired from the online, and the test environment is rebuilt by using an online database program version synchronously, but the actual rebuilt version is likely to have element deletion or element surface is provided with but is not consistent with the online version due to various factors such as network transmission, manual operation, content storage and the like in the recovery process;
2) The database versions are usually developed according to multiple branches corresponding to multiple online dates, and the staggered delivery situation of the test versions is frequently delivered in the respective branches, so that the updated historical record of the database versions of the test environment is different from the actual online situation when the program versions are installed in the same test environment;
3) Because the special date service verification requirement of the bank can require that the test environment date is set to be an unnatural date, the time stamp in the system cannot truly reflect the specific time for updating the database program, and thus the database version cannot be accurately identified.
The existing scheme for querying the database version in the test environment comprises the following steps: the version numbers are written in the database according to single programs, or the version numbers are mapped for the whole database program to distinguish, or the version of the database is determined by judging the update time of the program. However, the database version information queried in the existing manner is inaccurate due to the above 3 characteristics of the existing test environment.
Disclosure of Invention
Aiming at the problems in the prior art, the database version query method and the database version query device provided by the invention improve the accuracy of the queried database version information.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, the present invention provides a database version query method, the method including: determining an object and each object type related to version information in a database to be queried; version information of each object is obtained through each object type; and determining the version information of the database to be queried according to the version information of each object.
Optionally, the determining the object and each object type related to the version information in the database to be queried includes: determining all objects and object types of the database to be queried; and screening out target type objects from the determined objects, wherein the target type objects comprise definition class objects and program class objects, the definition class objects comprise objects of data records, and the program class objects comprise objects of data processing.
Optionally, the obtaining the version information of each object through each object type includes: determining a version inquiry strategy of each object according to the type of each object; and acquiring version information of each object according to the version inquiry strategy of each object.
Optionally, if the currently read object is the defined class object, the obtaining version information of each object according to the version query policy of each object includes: reading definition information corresponding to each object in the definition class object to obtain a version information set of the definition class object; wherein, the determining the version information of the database to be queried according to the version information of each object includes: and taking the version information set of the definition class object as the version information of the database to be queried.
Optionally, if the currently read object is the program class object, the obtaining version information of each object according to the version query policy of each object includes: reading program codes corresponding to all the objects in the program class objects; performing abstract calculation on each program code to obtain abstract information of each program code; splicing the abstract information; wherein, the determining the version information of the database to be queried according to the version information of each object includes: and taking the spliced abstract information as version information of the database to be queried.
Optionally, the reading the definition information corresponding to each object in the definition class object or the reading the program code corresponding to each object in the program class object includes: and reading definition information corresponding to each object in the definition class object or reading program codes corresponding to each object in the program class object from the system view.
Optionally, the definition information includes definition information of an object and object authorization information, and the definition information of the object includes an object name, an object column name, an object type, an object length, and an object constraint.
Optionally, the database query method provided by the invention further comprises the following steps: and storing the version information in association with the database to be queried.
Optionally, the database to be queried is determined according to query information sent by a client, the query information includes a database name, a database online time and an instance name, and the storing the version information in association with the database to be queried includes: judging whether version information corresponding to the query information is stored in the database to be queried, and if not, storing the currently determined version information in association with the database to be queried; if yes, judging whether the currently determined version information and the stored version information have differences, and if yes, updating the stored version information into the currently determined version information.
Optionally, if the currently determined version information is different from the stored version information, the database query method provided by the invention further includes: and generating a difference report according to the currently determined version information and the stored version information, and storing the difference report.
In a second aspect, the present invention provides a database version query apparatus, the apparatus comprising: the object determining module is suitable for determining objects and object types related to version information in the database to be queried; the object version information determining module is suitable for acquiring the version information of each object through each object type; and the database version information determining module is suitable for determining the version information of the database to be queried according to the version information of each object.
In a third aspect, the invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method described above when the program is executed by the processor.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
From the description, the database version query method provided by the invention acquires the object related to the version in the database to be queried, acquires the version related information from the object, and because the version information of the database is updated, the program of the database is necessarily updated, and the version related information acquired from the object can effectively illustrate the version condition, the version of the database can be accurately determined by acquiring the version related information of the object of the database to be queried, and the accuracy of querying the version of the database is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a database version query method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a database version query method according to another embodiment of the present invention;
FIG. 3 is a complete workflow diagram of a database version query method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a database version query device in accordance with an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, in the technical scheme of the invention, the acquisition, storage, use, processing and the like of the data all conform to the relevant regulations of national laws and regulations.
It should be noted that the method and the device for querying the database version disclosed in the application can be used in the financial field, the software testing field and any field except the financial field and the software testing field, and the application field of the method and the device for querying the database version disclosed in the application is not limited.
Aiming at the technical problem that the existing database version acquisition method cannot accurately acquire the database version in the test environment, the embodiment of the invention provides a database version query method and device for solving the technical problem.
The embodiment of the invention provides a specific implementation mode of a database version query method. Referring to fig. 1, the method specifically includes the following:
step 100: and determining the object and each object type related to the version information in the database to be queried.
The object herein corresponds to an object of a database, and can be understood as a generic term of a component, which is taken as a carrier for data storage and referencing in the database, and taken as a carrier for data storage and referencing in the database.
Typically, multiple logical databases may be installed in a database software, each of which is distinguished by an instance name. Thus, the database to be queried herein may actually be understood as a logical database, i.e. a database instance.
It should be noted that, the database to be queried is determined according to the query information sent by the client, and the query information is information input by the user at the user interface of the client. The query information includes a database name (i.e., a physical database name), a database online time, and an instance name (i.e., a logical database name).
Step 200: version information of each object is obtained through each object type.
Step 300: and determining the version information of the database to be queried according to the version information of each object.
As can be seen from the above description, the method for querying the version of the database provided by the invention obtains the object related to the version in the database to be queried, and obtains the version related information from the object.
In some embodiments, step 100 comprises:
firstly, determining all objects of a database to be queried, and specifically: the method comprises the steps of determining a target instance (target logic database) corresponding to query information (namely database name, database online time and instance name), determining all objects and object types under the target instance of the database, associating the objects with the object types, and storing the associated objects and object types as one data item to a list.
And then screening out the target type object related to the version information from the determined objects, specifically: and searching the target type objects from the obtained object list, and respectively storing the target type objects into files (e.g. lists) corresponding to the target type objects. The target type object related to the version information comprises a definition class object and a program class object, and then the target type object is searched from the obtained list and is stored in the file corresponding to each target type object respectively, wherein the file comprises: searching the definition class object from the obtained list, outputting the definition class object to the definition class object file, searching the program class object from the obtained list, and outputting the program class object to the program class object file.
The definition class object includes an object of a data record, which may include a table, an index, a sequence, and the like. Because the database objects such as functions, storage processes, triggers and the like are programs related to finishing business logic processing in the database, and similar to application programs, the database programs themselves need to be subjected to version management, so the program class objects comprise data processing objects, and the data processing objects can comprise functions, storage processes, triggers and the like.
Therefore, only the object capable of representing the version information is screened, and the version related information is acquired from the object, so that the data volume is reduced, the accuracy of the queried database version is improved, the data processing volume is reduced, and the query efficiency of the database version is improved.
In some embodiments, a connection between a logical database and a physical database needs to be established prior to determining the database to be queried. Specifically, the configuration information of the physical database is read according to the query information, and the logical database is connected with the physical database based on the configuration information, so that only the name of the logical database is displayed externally. The configuration information includes a user name, a password, a database IP, and a port.
In some embodiments, step 200 comprises: firstly, determining a version inquiry strategy of each object according to the type of each object, and then acquiring version information of each object according to the version inquiry strategy of each object, specifically:
if the currently read object is a definition class object, the version query policy is: and reading the definition information corresponding to each object from the definition class object file one by one until the definition information of each object in the definition class object list is read, so as to obtain a definition information set of the definition class object. Further, definition information corresponding to each object in the definition class object can be read from the system view, so that a definition information set of the definition class object is obtained and output to a definition class record file of the target instance.
Step 300 now comprises: and taking the version information set of the definition class object in the definition class record file as the version information of the database to be queried.
In the present embodiment, the definition information includes definition information of an object including an object name, an object column name, an object type, an object length, and an object constraint, and object authorization information including an authorized object, an owner of the object, an object type, a user who gives rights, and rights of the owner. It is understood that the present invention excludes statistical class information from definitions and retains only relatively fixed definition information as a version check key factor. Taking the table as an example, the definition of the object is shown in table 1.
Table 1 definition example of objects
table_name column_name type length precision scale
TRAN_LOG LOG_ID NUMBER 18 2 0
TRAN_LOG TRAN_ID VARchar2 100
TRAN_LOG BEGIN_TIME NUMBER 22 13 0
TRAN_LOG END_TIME NUMBER 22 13 0
TRAN_LOG TX_RESULT NUMBER 18 1 0
TRAN_LOG ERR_NO VARchar2 30
Table_name in table 1 indicates an object name, column_name indicates a column name, type indicates an object type, length indicates an object length, precision indicates a constraint, and scale indicates a maximum number of bits of a digital Parameter or Field object value, and scale value indicates a scale factor in an x direction.
In the following, the object authorization information is shown in table 2, taking the object as a table.
Table 2 object authorization information example
GRANTEE in Table 2 represents the authorized object, OWNER represents the OWNER of the object, TABLE represents the object type, GRANTER represents the user given rights, and PRIVILEGE represents the rights of the OWNER.
If the currently read object is a program class object, the version query policy is: and reading program codes corresponding to each image from the program class object file one by one, and then splicing the segmented codes of the same object program to obtain a program code set. And then, performing abstract calculation on each program code to obtain abstract information of each program code, and splicing the abstract information to obtain spliced abstract information. Taking the program class object as an example of a storage process (pkg_log_clean), the obtained summary information may be 4a5a6f6bea31ab5f4ee310f398efeac9 pkg_log_clean.
Further, program codes corresponding to the objects in the program class object list can be read from the system view, so that a program code set of the program class objects is obtained and output to a program class record file corresponding to the target instance for summarization. And then, performing abstract calculation on each program code in the program class record file to obtain abstract information of each program code, and splicing the abstract information to obtain spliced abstract information, wherein the abstract information of each program code can be spliced according to the storage sequence of each program code in the program class record file to obtain spliced abstract information. Step 300 now comprises: and taking the spliced abstract information as version information of the database to be queried.
The method of digest calculation is not limited herein, for example, digest information calculation is performed on each program code by means of MD5, and digest information calculation is performed on each program code by means of MD5 is known in the art, which is not described herein.
In some embodiments, referring to fig. 2, the method further comprises:
step 400: and storing the version information in association with the database to be queried.
Specific: judging whether version information corresponding to query information is stored in the database to be queried, if not, storing the currently determined version information in association with the database to be queried, if so, judging whether the currently determined version information and the stored version information have differences, if so, updating the stored version information into the currently determined version information, obtaining a difference report, and if not, ending the execution of the program.
And when the difference exists between the currently determined version information and the stored version information, generating a difference report according to the currently determined version information and the stored version information, and storing the difference report. Further, if the object is a definition class object, the content of the difference report is the comparison result of the definition information, and if the object is a program class object, the content of the difference report is the comparison result of the abstract information.
Thus, the version information of the database can be updated in time, the version information of the matched release branches (namely, each instance in the database) can be more accurately anchored to the version information of the test environment after multi-branch version interleaving deployment, and necessary references are provided for database management and test development. And the specific differences existing between the versions can be determined according to the difference report, so that necessary references are further provided for database management and test development.
Taking a test database of a bank credit card system newly built in a project and confirming the version of the database in the newly built environment from other database versions needing version check as an example, the complete working process of the database version query method is described, and the complete working process of the database version query method provided by the embodiment of the invention is shown in fig. 3, and comprises the following steps:
step 301: and receiving query information sent by the client, wherein the query information comprises a physical database name, a database online time and an instance name (namely a logical database name), for example, the physical database name is a Beijing area credit card test database, the database online time is 3 months and 1 days online branches, and the instance name is CroditCard.
Step 302: and reading configuration information of the physical database according to the name of the physical database in the query information.
Step 303: and establishing connection between the logical database and the physical database according to the configuration information.
Step 304: and determining a target logic database in the physical database according to the query information as a database to be queried.
Step 305: and determining the object and each object type related to the version information in the database to be queried.
Step 306: and determining the version inquiry strategy of each object according to the type of each object.
Step 307: and acquiring version information of each object according to the version inquiry strategy of each object.
Specifically, if the currently read object is a definition class object, the version query policy is: and reading definition information corresponding to each object in the definition class object list from the system view until the definition information of each object in the definition class object list is read, obtaining a definition information set of the definition class object, and outputting the definition information set to a definition class record file of the target instance.
If the currently read object is a program class object, the version query policy is: program codes corresponding to all the objects in the program class object list are read one by one from the system view, so that a program code set of the program class objects is obtained and output to a program class record file corresponding to the target instance for summarization. And then, performing abstract calculation on each program code in the program class record file to obtain abstract information of each program code, and splicing the abstract information of each program code according to the storage sequence of each program code in the program class record file to obtain spliced abstract information.
Step 308: and determining the version information of the database to be queried according to the version information of each object. Namely, the version information set of the definition class object in the definition class record file is used as the version information of the database to be queried, or the spliced abstract information is used as the version information of the database to be queried.
Step 309: judging whether version information corresponding to the query information is stored in the database to be queried, if not, executing step 310, and if so, executing step 311.
Step 310: and storing the currently determined version information in association with the database to be queried.
Step 311: and judging whether the currently determined version information and the stored version information are different, if yes, executing step 312, and if not, ending the execution of the program and finishing the inquiry of the database version.
Step 312: the stored version information is updated to the currently determined version information.
Step 313: and generating a difference report according to the currently determined version information and the stored version information, and storing the difference report.
As can be seen from the above description, the method for querying the version of the database provided by the invention acquires the object related to the version in the database to be queried, acquires the version related information from the object, and because the version information of the database is updated, the program of the database is necessarily updated, and the version related information acquired from the object can effectively illustrate the version condition, the version of the database can be accurately determined by acquiring the version related information of the object of the database to be queried, and the accuracy of querying the version of the database is improved.
In addition, the invention only screens out the object which can represent the version information, and obtains the version related information from the object, so that the data volume is reduced, thereby improving the accuracy of the queried database version, reducing the data processing volume and improving the efficiency of the database version query.
And starting from the background of frequent change of database version in commercial bank test environment, the invention performs version inspection of different strategies according to the granularity of database objects and gathers the version inspection as database-level version information of the associated release branch, thereby achieving the effect of performing effective version inspection under the conditions of frequent change and inaccurate time of the database and calibrating the basis of performing verification in the test environment.
Based on the same inventive concept, the embodiments of the present application also provide a database version query device, which may be used to implement the method described in the above embodiments, such as the following embodiments. Because the principle of solving the problem of the database version query device is similar to that of the database version query method, the implementation of the database version query device can be referred to the implementation of the database version query method, and the repetition is not repeated. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the system described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Referring to fig. 4, the embodiment of the present invention provides a specific implementation manner of a database version query device, where the database version query device specifically includes the following contents:
the object determination module 10 is adapted to determine objects and object types related to version information in the database to be queried.
The object version information determination module 20 is adapted to obtain version information of each object by each object type.
The database version information determining module 30 is adapted to determine the version information of the database to be queried according to the version information of each object.
As can be seen from the above description, the database version query device provided by the embodiment of the present invention obtains the object related to the version in the database to be queried, obtains the version related information from the object, and because the database version information is updated, the program of the database is necessarily updated, and the version related information obtained from the object can effectively illustrate the version condition, so that by obtaining the version related information of the object of the database to be queried, the version of the database can be accurately determined, and the accuracy of querying the version of the database is improved.
The embodiment of the present application further provides a specific implementation manner of an electronic device capable of implementing all the steps in the database version query method in the foregoing embodiment, and referring to fig. 5, the electronic device specifically includes the following contents:
a processor (processor) 501, a memory (memory) 502, a communication interface (Communications Interface) 503, and a bus 504;
wherein the processor 501, the memory 502, and the communication interface 503 perform communication with each other through the bus 504; the communication interface 503 is used to implement information transmission between the server-side device, the parameter acquiring device, and the client device.
The processor 501 is configured to invoke the computer program in the memory 502, and when the processor executes the computer program, the processor implements all the steps in the database version query method in the foregoing embodiment, for example, when the processor executes the computer program, the processor implements the following steps:
step 100: and determining the object and each object type related to the version information in the database to be queried.
Step 200: version information of each object is obtained through each object type.
Step 300: and determining the version information of the database to be queried according to the version information of each object.
From the description, the database version query method provided by the invention acquires the object related to the version in the database to be queried, acquires the version related information from the object, and because the version information of the database is updated, the program of the database is necessarily updated, and the version related information acquired from the object can effectively illustrate the version condition, the version of the database can be accurately determined by acquiring the version related information of the object of the database to be queried, and the accuracy of querying the version of the database is improved.
The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the database version query method in the above embodiments, and a computer program stored on the computer-readable storage medium, which when executed by a processor implements all the steps of the database version query method in the above embodiments, for example, the processor implements the following steps when executing the computer program:
step 100: and determining the object and each object type related to the version information in the database to be queried.
Step 200: version information of each object is obtained through each object type.
Step 300: and determining the version information of the database to be queried according to the version information of each object.
From the description, the database version query method provided by the invention acquires the object related to the version in the database to be queried, acquires the version related information from the object, and because the version information of the database is updated, the program of the database is necessarily updated, and the version related information acquired from the object can effectively illustrate the version condition, the version of the database can be accurately determined by acquiring the version related information of the object of the database to be queried, and the accuracy of querying the version of the database is improved.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a hardware+program class embodiment, the description is relatively simple, as it is substantially similar to the method embodiment, as relevant see the partial description of the method embodiment.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Although the present application provides method operational steps as an example or flowchart, more or fewer operational steps may be included based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented by an actual device or client product, the instructions may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiments or figures.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principles and embodiments of the present invention have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (13)

1. A database version query method, the method comprising:
determining an object and each object type related to version information in a database to be queried;
version information of each object is obtained through each object type;
and determining the version information of the database to be queried according to the version information of each object.
2. The query method of claim 1, wherein determining the object and each object type in the database to be queried that are related to version information comprises:
determining all objects and object types of the database to be queried;
and screening out target type objects from the determined objects, wherein the target type objects comprise definition class objects and program class objects, the definition class objects comprise objects of data records, and the program class objects comprise objects of data processing.
3. The query method of claim 2, wherein the obtaining version information of each object by each object type comprises:
determining a version inquiry strategy of each object according to the type of each object;
and acquiring version information of each object according to the version inquiry strategy of each object.
4. The query method as claimed in claim 3, wherein if the currently read object is the definition class object, the obtaining version information of each object according to the version query policy of each object comprises:
reading definition information corresponding to each object in the definition class object to obtain a version information set of the definition class object;
wherein, the determining the version information of the database to be queried according to the version information of each object includes:
and taking the version information set of the definition class object as the version information of the database to be queried.
5. The query method as claimed in claim 3, wherein if the currently read object is the program class object, the obtaining version information of each object according to the version query policy of each object comprises:
reading program codes corresponding to all the objects in the program class objects;
performing abstract calculation on each program code to obtain abstract information of each program code;
splicing the abstract information;
wherein, the determining the version information of the database to be queried according to the version information of each object includes:
and taking the spliced abstract information as version information of the database to be queried.
6. The query method of claim 4 or 5, wherein the reading definition information corresponding to each object in the definition class object or the reading program code corresponding to each object in the program class object comprises:
and reading definition information corresponding to each object in the definition class object or reading program codes corresponding to each object in the program class object from the system view.
7. The query method of claim 4, wherein the definition information comprises definition information of an object and object authorization information, the definition information of the object comprising an object name, an object column name, an object type, an object length, and an object constraint.
8. The query method of claim 1, wherein the method further comprises:
and storing the version information in association with the database to be queried.
9. The query method of claim 8, wherein the database to be queried is determined according to query information sent by a client, the query information including a database name, a database online time, and an instance name, the storing the version information in association with the database to be queried comprising:
judging whether version information corresponding to the query information is stored in the database to be queried, and if not, storing the currently determined version information in association with the database to be queried;
if yes, judging whether the currently determined version information and the stored version information have differences, and if yes, updating the stored version information into the currently determined version information.
10. The query method of claim 9, wherein if there is a difference between the currently determined version information and stored version information, the method further comprises:
and generating a difference report according to the currently determined version information and the stored version information, and storing the difference report.
11. A database version querying device, the device comprising:
the object determining module is suitable for determining objects and object types related to version information in the database to be queried;
the object version information determining module is suitable for acquiring the version information of each object through each object type;
and the database version information determining module is suitable for determining the version information of the database to be queried according to the version information of each object.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the database version query method of any of claims 1 to 10 when the program is executed by the processor.
13. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the database version query method of any of claims 1 to 10.
CN202310967813.7A 2023-08-02 2023-08-02 Database version query method and device Pending CN117435635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310967813.7A CN117435635A (en) 2023-08-02 2023-08-02 Database version query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310967813.7A CN117435635A (en) 2023-08-02 2023-08-02 Database version query method and device

Publications (1)

Publication Number Publication Date
CN117435635A true CN117435635A (en) 2024-01-23

Family

ID=89548709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310967813.7A Pending CN117435635A (en) 2023-08-02 2023-08-02 Database version query method and device

Country Status (1)

Country Link
CN (1) CN117435635A (en)

Similar Documents

Publication Publication Date Title
US7610317B2 (en) Synchronization with derived metadata
JP6723989B2 (en) Data driven inspection framework
AU2013202010B2 (en) Data selection and identification
US11593336B2 (en) Data pipeline branching
US11093521B2 (en) Just-in-time data quality assessment for best record creation
US20130041900A1 (en) Script Reuse and Duplicate Detection
US20080037854A1 (en) Data Source Currency Tracking and Currency Based Execution
US11599539B2 (en) Column lineage and metadata propagation
CN107016047A (en) Document query, document storing method and device
US11841836B2 (en) Target environment data seeding
US20210334292A1 (en) System and method for reconciliation of data in multiple systems using permutation matching
US8935207B2 (en) Inspecting replicated data
CN112307124A (en) Database synchronization verification method, device, equipment and storage medium
CN112308727A (en) Insurance claim settlement service processing method and device
CN115373889A (en) Method and device for data comparison verification and data repair in data synchronization
CN111143463B (en) Construction method and device of bank data warehouse based on topic model
CN109597828B (en) Offline data checking method, device and server
CN117435635A (en) Database version query method and device
CN111984662B (en) Method and device for updating databases in batches
CN112817931A (en) Method and device for generating incremental version file
US10521314B2 (en) Cross-referenced irregular field storage in databases
CN116225936A (en) Version error data control method and device
CN116737569A (en) File downloading batch operation testing method and device
CN115393082A (en) Transaction data reconciliation processing method and device based on block chain
CN117827832A (en) Data verification method, 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