CN106777025A - A kind of analysis method and system of database physical model - Google Patents

A kind of analysis method and system of database physical model Download PDF

Info

Publication number
CN106777025A
CN106777025A CN201611123126.3A CN201611123126A CN106777025A CN 106777025 A CN106777025 A CN 106777025A CN 201611123126 A CN201611123126 A CN 201611123126A CN 106777025 A CN106777025 A CN 106777025A
Authority
CN
China
Prior art keywords
similar
physical model
xml file
field length
file
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.)
Granted
Application number
CN201611123126.3A
Other languages
Chinese (zh)
Other versions
CN106777025B (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.)
State Grid Corp of China SGCC
State Grid Information and Telecommunication Co Ltd
Beijing Guodiantong Network Technology Co Ltd
Original Assignee
State Grid Corp of China SGCC
State Grid Information and Telecommunication Co Ltd
Beijing China Power Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, State Grid Information and Telecommunication Co Ltd, Beijing China Power Information Technology Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201611123126.3A priority Critical patent/CN106777025B/en
Publication of CN106777025A publication Critical patent/CN106777025A/en
Application granted granted Critical
Publication of CN106777025B publication Critical patent/CN106777025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying
    • 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
    • G06F16/212Schema design and management with details for data modelling support

Abstract

The invention discloses a kind of analysis method of database physical model, including:Obtain database physical model file to be analyzed;The database physical model file is converted into XML file;The XML file is parsed, the similar table in the XML file, and the similar field length different information in the similar table is counted;It can be seen that, in the present embodiment, the field length exception of similar table and similar table in physical model can be gone out by the analytic statistics to database physical model, so as to have a understanding being expressly understood that to whole database at the project initial stage, avoid due to database design defect, cause the later stage to rectify and improve a series of immeasurable cost brought;The invention also discloses a kind of analysis system of database physical model, above-mentioned technique effect can be equally realized.

Description

A kind of analysis method and system of database physical model
Technical field
The present invention relates to database physical model analysis technical field, more specifically to a kind of database physical mould The analysis method and system of type.
Background technology
Current environment, is the epoch for requiring quick exploitation, and the time of project initial stage planning database design documentation is simultaneously Inadequate, the Data Base Design Document difficulty that we will make suitable system exploitation within only time is very big, even if in short-term The interior design for completing database, the later stage also can may on stream find deficiency, and design documentation is changed at that time again can wave Take the substantial amounts of time, therefore, how to check the coupling and uniformity with analytical database physical model, location database design Careless mistake, be those skilled in the art need solve problem.
The content of the invention
It is an object of the invention to provide a kind of analysis method and system of database physical model, to realize to database The verification and analysis of physical model.
To achieve the above object, the embodiment of the invention provides following technical scheme:
A kind of analysis method of database physical model, including:
Obtain database physical model file to be analyzed;
The database physical model file is converted into XML file;
The XML file is parsed, the similar table in the XML file, and the similar field in the similar table is counted Difference in length information.
Wherein, the XML file includes:Document root node, root node table element, row set element, row aggregate attribute Element.
Wherein, the parsing XML file, counts the similar table in the XML file, and in the similar table Similar field length different information, including:
The document root node and the row set element are analyzed, table name identical column element in the column element is counted, And using table name identical column element as similar table;
If detecting, field length between similar table is different, generates similar field length corresponding with the similar table poor Different information.
Wherein, the similar table in the statistics XML file, and the similar field length difference in the similar table After information, also include:
Similar field length different information in the similar table, and the similar table is shown with tabular form Show.
A kind of analysis system of database physical model, including:
Acquisition module, for obtaining database physical model file to be analyzed;
Physical model file translations module, for the database physical model file to be converted into XML file;
Statistical module, for parsing the XML file, counts the similar table in the XML file, and the similar table Interior similar field length different information.
Wherein, the XML file includes:Document root node, root node table element, row set element, row aggregate attribute Element.
Wherein, the statistical module, including:
Analytic unit, for analyzing the document root node and the row set element;
Statistic unit, for counting table name identical column element in the column element, and table name identical column element is made It is similar table;
Similar literary name section different information generation module, during for detecting that the field length between similar table is different, generation with The corresponding similar field length different information of the similar table.
Wherein, this programme also includes:
Display module, for by the similar field length different information in the similar table, and the similar table arranging Sheet form is shown.
By above scheme, a kind of analysis method of database physical model provided in an embodiment of the present invention, including: Obtain database physical model file to be analyzed;The database physical model file is converted into XML file;Parsing is described XML file, counts the similar table in the XML file, and the similar field length different information in the similar table;Can See, in the present embodiment, similar table and similar table in physical model can be gone out by the analytic statistics to database physical model Field length exception, so as to have a understanding being expressly understood that to whole database at the project initial stage, it is to avoid because database sets Meter defect, causes the later stage to rectify and improve a series of immeasurable cost brought;The invention also discloses a kind of database thing The analysis system of model is managed, above-mentioned technique effect can be equally realized.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of analysis method schematic flow sheet of database physical model disclosed in the embodiment of the present invention;
Fig. 2 is XML file composition structural representation disclosed in the embodiment of the present invention;
Fig. 3 is a kind of analysis system structural representation of database physical model disclosed in the embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
The embodiment of the invention discloses a kind of analysis method and system of database physical model, to realize to database thing Manage the verification and analysis of model.
Referring to Fig. 1, a kind of analysis method of database physical model provided in an embodiment of the present invention, including:
S101, acquisition database physical model file to be analyzed;
Specifically, in the present embodiment, database physical model file to be analyzed is existing database physical model File, supports to obtain multiple physical model files from catalogue or obtains single physical model file from individual data source, Do not limit herein.
S102, the database physical model file is converted into XML file;
Wherein, the XML file includes:Document root node, root node table element, row set element, row aggregate attribute Element.It should be noted that after database physical model file is converted into XML file, also can extract the physical model file In two or more related relation tables, or single table not related with any table in a model.
Specifically, in the present embodiment, database physical model file can be parsed into corresponding XML file, referring to figure 2, the main composition unit of the XML document of conversion have:Under document root node, several root node table element, table elements Property element under row set element, row set, the text element in attribute etc., from top to bottom in tree-like inclusion relation, level Clear in structure is clearly demarcated.
S103, the parsing XML file, count the similar table in the XML file, and similar in the similar table Field length different information.
Wherein, the parsing XML file, counts the similar table in the XML file, and in the similar table Similar field length different information, including:
The document root node and the row set element are analyzed, table name identical column element in the column element is counted, And using table name identical column element as similar table;
If detecting, field length between similar table is different, generates similar field length corresponding with the similar table poor Different information.
Specifically, in the present embodiment, by taking Fig. 2 as an example, several root sections are stored in the document root node in XML file Point table element o:Table, for identifying different tables;In each table element o:There are multiple column element o under Table:Column, uses How many row in mark data table;Multiple elements under column element are used for the explanation to the row:
a:Name is used for tag field Chinese;
a:Code is used for tag field English name, i.e. field name;
a:DataType is used for tag field type;
a:Comment is used for watching attentively for tag field;
a:Creator is used for the founder of tag field, is the field who sets up;
Accordingly, in the present embodiment, by analyzing document root node and row set element, table name is identical in statistics column element Column element, and be specially table name identical column element as similar table:
It is compared by the different attribute in row set element, for example:Compare a:Code (field English name), a: DataType (field type) the two attributes, are similar table if all same, accordingly, in order to improve to the accurate of similar table Property, a can be increased:Other attributes for comparing of needs such as Name.
It should be noted that similar table can also be by other means determined in the present embodiment, for example:By similarity Percentage counts similar table:If a of field (row) between table:Code (field English name) and a:DataType (field classes Type) it is identical, then the similarity of table is 100%;If a of field (row) between table:Code (field English name), a: The similarity of DataType (field type) is 80%, then the similarity of table is 80%;If a of field (row) between table: Code (field English name), a:Without repeating to arrange, then the similarity of table is 0 to DataType (field type), so that it is determined that table Between similarity, and can predetermined similarity decision threshold, if similarity between table is more than predetermined threshold, be judged to Similar table.
It is understood that the similar field length different information in similar table in this programme, can be by different tables Between associate field a:Length (field length) determines, if a of the associate field between two similar tables:Length (field length) is different, then illustrate there is similar field length difference between two similar tables, so as to generate corresponding difference letter Breath.
Based on above-described embodiment, in the present embodiment, the similar table in the statistics XML file, and the phase After like the similar field length different information in table, also include:
Similar field length different information in the similar table, and the similar table is shown with tabular form Show.
Specifically, after field length difference in similar table and similar table in counting XML file, can be by list Form shown so that user understands problem present in database physical model.It can be seen that, provided in the present embodiment Database physical model analysis method, in can quickly positioning in similar table Repeating Field and rapid extraction design documentation Exception field information advantage.For existing manual review, examination cost is reduced, it is to avoid hand inspection occurs Mistake.
Analysis system provided in an embodiment of the present invention is introduced below, analysis system described below with it is described above Analysis method can be with cross-referenced.
Referring to Fig. 3, a kind of analysis system of database physical model provided in an embodiment of the present invention, including:
Acquisition module 100, for obtaining database physical model file to be analyzed;
Physical model file translations module 200, for the database physical model file to be converted into XML file;
Statistical module 300, for parsing the XML file, counts the similar table in the XML file, and the phase Like the similar field length different information in table.
Wherein, the XML file includes:Document root node, root node table element, row set element, row aggregate attribute Element.
Based on above-described embodiment, the statistical module, including:
Analytic unit, for analyzing the document root node and the row set element;
Statistic unit, for counting table name identical column element in the column element, and table name identical column element is made It is similar table;
Similar literary name section different information generation module, during for detecting that the field length between similar table is different, generation with The corresponding similar field length different information of the similar table.
Based on above-mentioned any embodiment, also include in the present embodiment:
Display module, for by the similar field length different information in the similar table, and the similar table arranging Sheet form is shown.
Each embodiment is described by the way of progressive in this specification, and what each embodiment was stressed is and other The difference of embodiment, between each embodiment identical similar portion mutually referring to.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or uses the present invention. Various modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, the present invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The scope most wide for causing.

Claims (8)

1. a kind of analysis method of database physical model, it is characterised in that including:
Obtain database physical model file to be analyzed;
The database physical model file is converted into XML file;
The XML file is parsed, the similar table in the XML file, and the similar field length in the similar table is counted Different information.
2. analysis method according to claim 1, it is characterised in that
The XML file includes:Document root node, root node table element, row set element, row aggregate attribute element.
3. analysis method according to claim 2, it is characterised in that the parsing XML file, counts the XML Similar field length different information in similar table in file, and the similar table, including:
The document root node and the row set element are analyzed, table name identical column element in the column element is counted, and will Table name identical column element is used as similar table;
If detecting, field length between similar table is different, generates similar field length difference corresponding with the similar table and believes Breath.
4. the analysis method according to any one in claim 1-3, it is characterised in that the statistics XML file In similar table, and after similar field length different information in the similar table, also include:
Similar field length different information in the similar table, and the similar table is shown with tabular form.
5. a kind of analysis system of database physical model, it is characterised in that including:
Acquisition module, for obtaining database physical model file to be analyzed;
Physical model file translations module, for the database physical model file to be converted into XML file;
Statistical module, for parsing the XML file, counts the similar table in the XML file, and in the similar table Similar field length different information.
6. analysis system according to claim 5, it is characterised in that
The XML file includes:Document root node, root node table element, row set element, row aggregate attribute element.
7. analysis system according to claim 6, it is characterised in that the statistical module, including:
Analytic unit, for analyzing the document root node and the row set element;
Statistic unit, for counting table name identical column element in the column element, and using table name identical column element as phase Like table;
Similar literary name section different information generation module, during for detecting that the field length between similar table is different, generation with it is described The corresponding similar field length different information of similar table.
8. the analysis system according to any one in claim 5-7, it is characterised in that also include:
Display module, for by the similar field length different information in the similar table, and the similar table with list shape Formula is shown.
CN201611123126.3A 2016-12-08 2016-12-08 Analysis method and system of database physical model Active CN106777025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611123126.3A CN106777025B (en) 2016-12-08 2016-12-08 Analysis method and system of database physical model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611123126.3A CN106777025B (en) 2016-12-08 2016-12-08 Analysis method and system of database physical model

Publications (2)

Publication Number Publication Date
CN106777025A true CN106777025A (en) 2017-05-31
CN106777025B CN106777025B (en) 2020-10-27

Family

ID=58877391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611123126.3A Active CN106777025B (en) 2016-12-08 2016-12-08 Analysis method and system of database physical model

Country Status (1)

Country Link
CN (1) CN106777025B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165669A (en) * 2018-07-09 2019-01-08 浙江大学 Three-dimensional dough sheet model file similarity detection method based on model identification code
CN109325035A (en) * 2018-11-29 2019-02-12 阿里巴巴集团控股有限公司 The recognition methods of similar table and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040236758A1 (en) * 2003-05-22 2004-11-25 Medicke John A. Methods, systems and computer program products for web services access of analytical models
CN101183361A (en) * 2006-11-13 2008-05-21 中兴通讯股份有限公司 Method of relation data base applications automatic upgrade
CN102065413A (en) * 2010-11-17 2011-05-18 北京北方烽火科技有限公司 Database updating method and system, and base station self-starting method and system
CN102411588A (en) * 2010-09-26 2012-04-11 金蝶软件(中国)有限公司 Comparison checking method and system of data table
CN102609777A (en) * 2012-02-17 2012-07-25 中国科学院合肥物质科学研究院 Method for controlling emergency decision knowledge base system for disaster reduction
CN102890720A (en) * 2012-10-16 2013-01-23 南京通达海信息技术有限公司 Database inspection and maintenance method
CN102982168A (en) * 2012-12-12 2013-03-20 江苏省电力公司信息通信分公司 Metadata schema matching method based on XML (extensive markup language) document
US8762428B2 (en) * 2011-06-06 2014-06-24 International Business Machines Corporation Rapidly deploying virtual database applications using data model analysis
CN104216948A (en) * 2014-08-12 2014-12-17 上海新炬网络技术有限公司 Difference control method of data model
CN104598610A (en) * 2015-01-29 2015-05-06 无锡江南计算技术研究所 Step-by-step database data distribution uploading and synchronizing method
CN105786998A (en) * 2016-02-19 2016-07-20 创元网络技术股份有限公司 Database middleware system and method for processing data through database middleware system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040236758A1 (en) * 2003-05-22 2004-11-25 Medicke John A. Methods, systems and computer program products for web services access of analytical models
CN101183361A (en) * 2006-11-13 2008-05-21 中兴通讯股份有限公司 Method of relation data base applications automatic upgrade
CN102411588A (en) * 2010-09-26 2012-04-11 金蝶软件(中国)有限公司 Comparison checking method and system of data table
CN102065413A (en) * 2010-11-17 2011-05-18 北京北方烽火科技有限公司 Database updating method and system, and base station self-starting method and system
US8762428B2 (en) * 2011-06-06 2014-06-24 International Business Machines Corporation Rapidly deploying virtual database applications using data model analysis
CN102609777A (en) * 2012-02-17 2012-07-25 中国科学院合肥物质科学研究院 Method for controlling emergency decision knowledge base system for disaster reduction
CN102890720A (en) * 2012-10-16 2013-01-23 南京通达海信息技术有限公司 Database inspection and maintenance method
CN102982168A (en) * 2012-12-12 2013-03-20 江苏省电力公司信息通信分公司 Metadata schema matching method based on XML (extensive markup language) document
CN104216948A (en) * 2014-08-12 2014-12-17 上海新炬网络技术有限公司 Difference control method of data model
CN104598610A (en) * 2015-01-29 2015-05-06 无锡江南计算技术研究所 Step-by-step database data distribution uploading and synchronizing method
CN105786998A (en) * 2016-02-19 2016-07-20 创元网络技术股份有限公司 Database middleware system and method for processing data through database middleware system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
WARAPORN等: "A System for Detecting XML Similarity in Content and Structure Using Relational Database", 《PROCEEDINGS OF THE 18TH ACM CONFERENCE ON INFORMATION AND KNOWLEDGE MANAGEMENT》 *
叶鸥: "XML与模式匹配技术及其应用研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
战颖: "多数据库系统数据仓库集成技术应用研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165669A (en) * 2018-07-09 2019-01-08 浙江大学 Three-dimensional dough sheet model file similarity detection method based on model identification code
CN109325035A (en) * 2018-11-29 2019-02-12 阿里巴巴集团控股有限公司 The recognition methods of similar table and device

Also Published As

Publication number Publication date
CN106777025B (en) 2020-10-27

Similar Documents

Publication Publication Date Title
CN103942137B (en) Browser compatibility method of testing and device
CN105868171B (en) A kind of method of calibration and device of Excel file
Escorza et al. Hertzsprung-Russell diagram and mass distribution of barium stars
CN107145584A (en) A kind of resume analytic method based on n gram models
CN105095091B (en) A kind of software defect code file localization method based on Inverted Index Technique
CN104317909A (en) Method and device for verifying data of points of interest
Orduna-Malea et al. Performance behavior patterns in author-level metrics: A disciplinary comparison of Google Scholar Citations, ResearchGate, and ImpactStory
Krause et al. Multiple tokenizations in a diachronic corpus
CN106777025A (en) A kind of analysis method and system of database physical model
Piskorski Morphisto-an open source morphological analyzer for German
CN109408502A (en) A kind of data standard processing method, device and its storage medium
Sidarenka et al. Discourse segmentation of German texts
Luke Writing the visible page: a multimodal approach to graphic devices in literary fiction
Rill et al. A phrase-based opinion list for the German language.
CN103593182A (en) Method for reconfiguring software by using clustering mode
Martin et al. Readability and the Web
Faaß et al. Design and application of a Gold Standard for morphological analysis: SMOR as an example of morphological evaluation
Pichler et al. Size matters!? measuring the complexity of xml schema mapping models
CN106557569B (en) Method and device for importing unstructured document based on meta-model
Sharma et al. Standardized representation of clinical study data dictionaries with CIMI archetypes
Wang et al. Quantitative analysis of requirements evolution across multiple versions of an industrial software product
CN108009787A (en) A kind of Audit data comparative analysis management system
US9684691B1 (en) System and method to facilitate the association of structured content in a structured document with unstructured content in an unstructured document
Eichelberger et al. A comprehensive survey of UML compliance in current modelling tools
CN106777128A (en) The data collecting system and collecting method of a kind of inspection project

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100192 Beijing city Haidian District Qinghe small Camp Road No. 15 building 710 room research

Applicant after: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Applicant after: STATE GRID INFORMATION & TELECOMMUNICATION GROUP Co.,Ltd.

Applicant after: STATE GRID CORPORATION OF CHINA

Address before: 100192 Beijing city Haidian District Qinghe small Camp Road No. 15 building 710 room research

Applicant before: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: STATE GRID INFORMATION & TELECOMMUNICATION GROUP Co.,Ltd.

Applicant before: State Grid Corporation of China

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190725

Address after: 100085 Building 32-3-4108-4109, Pioneer Road, Haidian District, Beijing

Applicant after: BEIJING GUODIANTONG NETWORK TECHNOLOGY Co.,Ltd.

Applicant after: STATE GRID CORPORATION OF CHINA

Applicant after: STATE GRID INFORMATION & TELECOMMUNICATION GROUP Co.,Ltd.

Address before: 100192 Beijing city Haidian District Qinghe small Camp Road No. 15 building 710 room research

Applicant before: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: STATE GRID INFORMATION & TELECOMMUNICATION GROUP Co.,Ltd.

Applicant before: STATE GRID CORPORATION OF CHINA

GR01 Patent grant
GR01 Patent grant