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

Database table structure analysis method and system

An analysis method and analysis system technology, applied in the field of database table structure analysis methods and systems, can solve the problems of inability to obtain the relationship between database tables, inability to use primary and foreign keys, etc., to achieve accurate analysis, saving labor and time costs.

Inactive Publication Date: 2018-06-01
XINBO ZHUOCHANG TECH BEIJING
View PDF10 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in the production environment, primary and foreign keys cannot be used between tables in the database, so we cannot obtain the relationship between tables in the database through the primary and foreign key relationship

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
  • Database table structure analysis method and system
  • Database table structure analysis method and system
  • Database table structure analysis method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0071] Such as figure 1 , figure 2 As shown, sub-step 101 in step 100 is executed, and the export module 200 starts to work. Sub-step 102 and sub-step 103 are executed sequentially, the export module 200 selects the target database and exports the html file from the database. Executing sub-step 111 in step 110, the file parsing module 210 determines the number of samples. Execute sub-step 112, traverse the html file to randomly extract sample data, and obtain the value of a certain row and a certain column of a certain html file. Execute sub-step 113, generate a sample data set from the sample data obtained in the previous sub-step, the sample size is optional, and the sample data is not repeated. Sub-step 121 in step 130 is executed, and the thread determination sub-module 221 in the data analysis module 220 determines the number of parallel threads. Executing sub-step 122, the task allocation sub-module 222 performs multi-thread parallel task allocation. Executing sub-...

Embodiment 2

[0073] 1. Requirements

[0074] The software tool can analyze the table structure of the unknown database, and can obtain the relationship between the tables of the database, which tables have associated relations, and display them.

[0075] 2. Basic idea analysis and design concept

[0076] The database table structure analysis tool uses python as the main programming language, uses object-oriented methods for analysis and design, adopts parallel computing, and greatly improves operating efficiency.

[0077] The tool conducts thought analysis with the following points:

[0078] 1. Because in the production environment, the constraints of primary and foreign keys cannot be used between tables in the database, it is impossible for us to obtain the relationship between tables through the system tables in the database. Therefore, the relationship can only be judged based on the data in the table;

[0079] 2. Based on the analysis of point 1, since the values ​​of the primary a...

Embodiment 3

[0113] Use the parseHtmlToDataSet method to obtain the table relationship set. Similar to sample data generation, we implemented the AnsTable parsing class inherited from HTMLParser to parse each html file. The main purpose of the AnsTable parsing class is to obtain table relationship sets based on sample data. We use dataNode to store possible table relationships in the form of nodes. The determination of the table relationship is determined based on the sample data.

[0114] We achieve the acquisition of table relationship sets through recursion, looping, etc., which involves methods and classes such as anlysisAssociation, parseHtmlToDataSet, threadParallel, scan_files, AnsTable, and dataNode, among which:

[0115] 1. parseHtmlToDataSet is the main method, and the recursive implementation is used to obtain the table relationship set;

[0116] 2. AnsTable is the main body of parsing html and the main implementation of obtaining relationship sets;

[0117] 3. dataNode is us...

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 provides a database table structure analysis method and system. The method comprises the following steps of exporting an html file from a database, parsing the html file, and obtaining an appropriate quantity of random sample data from the file; using a data association analysis algorithm to obtain a possible association relationship according to the sample data; analyzing the possibility of the association relationship and conducting processing; graphically displaying an inter-table relationship of the database according to the obtained association relationship. The database table structure analysis method and system aim at obtaining the inter-table relationship of the database by analyzing the data association of the unknown database, a user has clear understanding of a table structure of the unknown database accordingly, and the following utilization of the database are facilitated.

Description

technical field [0001] The invention relates to the technical field of database analysis, in particular to a database table structure analysis method and system. Background technique [0002] For a system, one or more databases are often used. In some cases (secondary development, etc.), we need to know the relationship between tables in the database. However, in the production environment, primary and foreign keys cannot be used between tables in the database, so we cannot obtain the relationship between tables in the database through the primary and foreign key relationship. There are often tens of thousands of data in the database, and it is not feasible to judge manually. Facing an unknown database, we need a reliable and effective data structure relationship analysis method to obtain the relationship between tables in the database. [0003] In the case that the primary and foreign keys of the database are not available, we can only determine the relationship between ...

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): G06F17/30
CPCG06F2216/03G06F16/2282G06F16/2465
Inventor 吕军震刘杰胥洪锋于国方李长松武佳
Owner XINBO ZHUOCHANG TECH BEIJING
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