Unlock instant, AI-driven research and patent intelligence for your innovation.

Multi-type database table structure comparison method and system, equipment and storage medium

A technology of database and table structure, applied in the direction of database model, electronic digital data processing, structured data retrieval, etc., can solve problems such as grammar cannot be executed, and achieve the effect of solving difficult problems

Pending Publication Date: 2021-11-19
SHENZHEN KAIFA TECH (CHENGDU) CO LTD
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method is used in the comparison of different databases. Due to the difference in syntax and data types, many people may think that the two are the same during the comparison, but the results are different due to reasons such as syntax and data types. The automatically generated sql is due to Syntax and other reasons may not be able to execute in the target database

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Multi-type database table structure comparison method and system, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] Such as figure 1 As shown, the present embodiment provides a multi-type database table structure comparison method, which mainly includes the following steps:

[0036] Step 1. Define the database table structure attribute SQL query execution class, and set the executable SQL for querying the database table structure attribute. Every time a database type is added, its corresponding execution class needs to be written, and its supported table structure attributes need to be defined to facilitate the acquisition of its common attributes when comparing different database types, such as table structures such as tables, indexes, and serial numbers. Attribute, its corresponding executable SQL is used when querying the specific information of the table structure attribute.

[0037] Step 2, extracting common table structure attributes of the source database and the target database. The table structures supported by different types of databases may be different. It is only mean...

Embodiment 2

[0051] This embodiment is on the basis of embodiment 1:

[0052] This embodiment provides a multi-type database table structure comparison system, including:

[0053] The query preprocessing module is used to define the database table structure attribute SQL query execution class, and set the executable SQL statement for querying the database table structure attribute;

[0054] The common attribute extraction module is used to extract the common table structure attributes of the source database and the target database;

[0055] The attribute query and conversion module is used to query the common table structure attributes of the two databases according to their corresponding executable SQL statements, obtain the result set, and convert them into data objects of the same type;

[0056] The data object comparison module is used to compare the converted data objects according to the three aspects of addition, modification and deletion, and record the comparison results;

[005...

Embodiment 3

[0060] This embodiment is on the basis of embodiment 1:

[0061] This embodiment provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the multi-type database table structure comparison method in Embodiment 1 when executing the computer program. Among them, the computer program may be in the form of source code, object code, executable file or some intermediate form.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a multi-type database table structure comparison method and system, equipment and a storage medium. The comparison method comprises the following steps: defining a database table structure attribute SQL query execution class, and setting executable SQL statements for querying database table structure attributes; extracting public table structure attributes of a source database and a target database; querying the public table structure attributes of the two databases according to the corresponding executable SQL statements to obtain a result set, and converting the result set into data objects of the same type; comparing the converted data objects according to three aspects of newly adding, modifying and deleting; performing corresponding conversion on the table structure attributes with differences according to the table structure attributes of the target database; and defining an SQL generation class of the database table structure attributes, and generating an executable SQL according to DDL grammars of the table structure attributes of the target database. The problem that table structures of different databases are difficult to compare is solved.

Description

technical field [0001] The invention relates to the technical field of electrical digital data processing, in particular to a multi-type database table structure comparison method, system, equipment and storage medium. Background technique [0002] Nowadays, there are more and more types of databases, and the same enterprise may use multiple databases at the same time. Correspondingly, it is necessary to compare the table structures of these databases to keep the same table structure. At present, it is very easy to compare the table structure of the same database, but how to compare the table structure attributes of different types of databases, and the corresponding DDL syntax is also different, and synchronize the two into The same table structure has become a problem faced by enterprises. [0003] The invention patent CN201710149902.5 discloses a database table structure synchronization method, device, electronic equipment and storage medium, which can automatically gene...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/242G06F16/28
CPCG06F16/2445G06F16/284Y02D10/00
Inventor 黄富贵
Owner SHENZHEN KAIFA TECH (CHENGDU) CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More