CN103246649A - Dynamic database building method - Google Patents

Dynamic database building method Download PDF

Info

Publication number
CN103246649A
CN103246649A CN2012100225595A CN201210022559A CN103246649A CN 103246649 A CN103246649 A CN 103246649A CN 2012100225595 A CN2012100225595 A CN 2012100225595A CN 201210022559 A CN201210022559 A CN 201210022559A CN 103246649 A CN103246649 A CN 103246649A
Authority
CN
China
Prior art keywords
database
data
xml
node
information
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
CN2012100225595A
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.)
Shenyang Aircraft Design and Research Institute Aviation Industry of China AVIC
Original Assignee
Shenyang Aircraft Design and Research Institute Aviation Industry of China AVIC
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 Shenyang Aircraft Design and Research Institute Aviation Industry of China AVIC filed Critical Shenyang Aircraft Design and Research Institute Aviation Industry of China AVIC
Priority to CN2012100225595A priority Critical patent/CN103246649A/en
Publication of CN103246649A publication Critical patent/CN103246649A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a dynamic database building method. The dynamic database building method is characterized by mainly including three steps: extensive makeup language (XML) tree generation, data model generation and database generation. The dynamic database building method meets backward extended requirements, simultaneously avoids database data redundancy and storage space waste, and improves database maintenance.

Description

A kind of database dynamic banking process
Technical field
Engineering data base can satisfy the various needs of certain engineering field deal with data well, the present invention relates to the foundation of engineering data base, relates in particular to the dynamic banking process in a kind of flight simulation engineering data base.
Background technology
At present, the real-time flight simulation system is an important applied field of Emulation Technology in Modern Computer, it is studied being about to drop into flying quality and flight control, navigation, the guidance system of developing the aircraft that uses, the flight quality of aircraft is analyzed and assessed, find the problem that aircraft exists ahead of time and give to solve in time, reduce the possibility that goes wrong after aircraft comes into operation as far as possible, reduce economy and personal casualty loss that these problems cause.
The flight simulation engineering data base is an important ingredient of real-time flight simulation system, it is used for various emulated datas involved in the real-time flight simulation process are managed and handle, for simulation modeling and evaluation of simulation result provide important data support, it is the core of real-time flight simulation system handles data, for security and the integrality of analogue system data provides important guarantee; The gordian technique of flight simulation engineering data base is to set up database model, and the basis that model is set up is the raw data of simulation object, the characteristics of this project data are: the data type complexity, data volume is big, data requirement is various, reach relevance complicated between the data, usually the banking process of database is that static state is built the storehouse, at first determine simulation object, determine that by each flight simulation subsystem the raw data of simulation object (contains data type, data volume, data requirement, relevance between the data) according to these raw data conceputal modeling successively, logic data model, Physical data model, finally finish the foundation in storehouse, this technology does not have expansion backward, in case data object changes, just need build the storehouse again, even same simulation object is in the engineering process of simulation, often also need to increase to change emulated data, when demand changes a little, data model in the past just can not meet the demands, cause the corresponding different database of different data model needs, too many man power and material and time are wasted in the overlapping development of database.
In order to address the above problem, the method of people's employing at present has two kinds usually: first, when setting up database model, all contingent variations are included in wherein, set up a very huge database then, though this technology can satisfy the demand of expansion backward, it has caused the waste of data redundancy and storage space; Second, when data model changed, the people revised corresponding database development code then for entering background data base platform modifying database structure, the problem that this technology exists is that the maintenance to database brings very big difficulty, and to have increased the people be the probability that leads to errors.
Summary of the invention
Purpose of the present invention: in order addressing the above problem, to the invention provides a kind of database dynamic banking process, to satisfy the demand of expansion backward, avoided the waste of database data redundancy and storage space simultaneously, improved the maintenance of database.
Technical scheme of the present invention: database dynamic banking process provided by the invention mainly comprises the generation of three step: XML trees, the generation of data model, the generation of database; (1) generation of XML tree comprises: define mapping ruler, write the XML template, load the XML template; (2) generation of data model: at first adopt DOM that needed information is parsed from the XML tree, the program of converting thereof into can the recognition data structure, provide parameter information for setting up data model, structure array of organization definition according to tree is used for depositing the data that parsing obtains then, load whole XML data model tree, circulation is at last taken out the node that comprises information needed in the XML tree and nodal information is taken out the data that are converted to the structure type and is placed in the structure array; (3) generation of database: at first connect the background database manager system, adopt the technology of retrieval book from the structure array of depositing parameter information, to take out needed information, write the required SQL statement of modeling then and parameter information is comprised wherein, submit and carry out SQL statement at last to, corresponding database is set up on the backstage.
Beneficial effect of the present invention is: the user interface that (1) is friendly: the user can operate database by user interface, does not need the database knowledge of specialty; (2) powerful Database Modeling ability: this database in conjunction with the XML technology, for various simulation object models provide a unified Database Modeling interface, is realized the unified Modeling of all emulation platform databases towards all emulation platforms; (3) dynamically build the storehouse: this project database encapsulates the database modeling technique, system can dynamically set up database model according to the simulation object model information that obtains, dynamically build the storehouse, do not need artificial participation, thereby also avoided occurring in the artificial modeling process wrong possibility; (4) good systemic openness: because this system has the characteristics of the database model that can dynamically set up, therefore can change the model of database along with the change of simulation object model rapidly, effectively, thereby realized the versatility of this database between different emulation platforms, realized the opening of system.
Description of drawings
Fig. 1 is that Database Dynamic of the present invention is built storehouse design concept figure.
Fig. 2 is the structural representation of database data storage node paper mulberry of the present invention.
Fig. 3 is XML tree product process figure in the database dynamic banking process of the present invention.
Fig. 4 is data model product process figure in the database dynamic banking process of the present invention.
Fig. 5 is database product process figure in the database dynamic banking process of the present invention.
Embodiment
At first the design concept to the XML technology in the database dynamic modeling and Database Dynamic database technology describes.
XML (eXtensible Markup Language, extend markup language) is the rule of a cover definition semantic marker, it is at HTML (Hypertext Markup Language, the text mark language) a kind of sign flag language that grows up on the basis, the same with HTML, XML also is the simplification form of deriving out from standard generalized markup language SGML (Standard Generalized Markup Language), its objective is the standard that allows data description that a simple possible is arranged, but it has broken through the constraint of the fixation mark set of HTML, and the user can define various labels as required and describe data element in the document.
Build the demand in storehouse in order to satisfy Database Dynamic, designed system must be able to preserve the artificial intelligence model of user's typing, and it is transferred in the module of setting up database model, thereby realize the function of in background data base, dynamically building the storehouse according to the data of user's typing; Total system is designed to external schema, internal schema, three kinds of patterns of generate pattern, and each pattern is finished different tasks towards different objects; Database Dynamic is built the storehouse design concept as shown in Figure 1, and table 1 is that Database Dynamic is built each mode capabilities table of storehouse.
Table 1 Database Dynamic is built each mode capabilities table of storehouse
MODE name Towards object The function that realizes
External schema The user Provide the user to the data interface operable
Internal schema System Preserve the conversion of data and form
Dirt becomes the mode The background data base platform Dynamically set up database model
The external schema user oriented allows the user that the database model parameter is carried out various operations, and this pattern can realize by the mode of writing the user interface code; Internal schema system-oriented, the parameter information that is used for the preserving user's typing line data format conversion of going forward side by side generates the intermediate form file of being convenient to transmit with data sharing, and the intermediate form fileinfo is converted to background data base desired data type; Generate pattern is carried out SQL (Structure Query Language, the Structured Query Language (SQL)) statement of dynamically setting up database model, the foundation of fulfillment database model towards the background database manager system.
When satisfying data-switching to the demand of data retrieval speed, the structure of preserving data adopts tree structure when definition, wherein database is as the root node of tree, each form in the database is as each subtree of root node, each field information in the form is as each leaf node of tree, and concrete storage node composition as shown in Figure 2.
When certain field information of certain form is inquired about, can finish by retrieving the logical address of this field in the structure array, the field address can calculate by following formula: F Ij=T 1+ T 2+ ...+T I-1+ (j-1) * B+S
(1.1)
F wherein IjRepresent j the corresponding logical address of field in i the form, T iRepresent i the storage size that table information is shared, the space size that each field among the B representative table i is distributed, S represents the start address of this structure array.
The generation of intermediate form file and parsing adopt the XML technology to realize, DOM in the XML technology (Document Object Model, DOM Document Object Model) can allow developer's random access XML tree node also can carry out the interpolation of node, revise and deletion, by using the XML file as the intermediary of transmission data, the Database Modeling information that the user is preserved generates the XML file, thereby realize the parameter information from arbitrary source is converted to the XML form, and then obtain desired data storehouse modeling information by the analyzing XML file, carry out the foundation of database model at last.
Below in conjunction with accompanying drawing 3 and specific embodiment the generation that the XML in the dynamic database technology of the present invention sets is described in detail.
User's typing is from the database model information of arbitrary source, system becomes the XML file layout with these database model information translation and preserves, these information are inserted in whole the XML tree as subtree or node, and circulation is preserved this XML file after inserting all subtrees and node; Step has (1) definition mapping ruler
According to the structure of setting among Fig. 2, the mapping ruler of design from the structure data to the XML formatted data mainly comprises following several aspect: define a root node, come mark with DATA; Database name is referred to as the child node of DATA, marks with DATABASE, node content is database-name;
The subtree of each tables of data as DATA, to mark with TABLE, and for it inserts a child node, mark with TABLENAME, node content is the title of table; The subtree of each line item in the table as corresponding TABLE, use the VAR mark; The child node of the needed field of every record as VAR, and mark with corresponding field name, node content is the corresponding record value of each field.
(2) write out corresponding XML template according to mapping ruler
(3) load the XML template, from record set, get needed node data, data are inserted in the template tree, till all data loadeds as corresponding subtree and node circulation.
The definition of mapping ruler can change according to the form of tree, when rule definition changes, only needs to revise corresponding XML masterplate, just can generate the XML file of different expression-forms, has strengthened the dirigibility of the XML document form that generates.
Fig. 3 is XML tree product process figure in the database dynamic banking process of the present invention, at first defines DOM document and element variable, loads the XML template, judges then whether the subsystem sequence number is maximum, and the generation of then preserving the XML file tree in this way finishes; As not being then to load subsystem node, see whether this system has record, then return as record not and to judge whether maximum step of subsystem sequence number, then get the subsystem variable if any record and deposit the XML tree in as the subsystem corresponding node, get to play to return up to record and judge whether maximum step of subsystem sequence number, final judge be till, the XML tree generates finishes.
Wherein the child node that comprises of each subsystem node of XML tree mainly contains the child node sum of the sequence number of this subsystem, floating type that subsystem comprises, integer, character type, all variable node, the content that each variable node comprises are decided according to system's needs under this system, comprise variable name, types of variables, corresponding reflective memory address, physical significance etc. usually.
Then by reference to the accompanying drawings 4 and specific embodiment the generation of the data model in the dynamic database technology of the present invention is described in detail.
At first adopt DOM that needed information is parsed from XML tree, the program of converting thereof into can the recognition data structure, thereby provides essential parameter information for setting up database model; In the process of resolving, both can resolve whole tree fully, comprise the node of user's information needed during also only analyzing XML is set, this can decide according to the required information of modeling; Specific algorithm is:
(1) structure array of organization definition of the tree of describing according to Fig. 2 is used for depositing and resolves the data that obtain; (2) load whole XML data model tree; (3) circulation is taken out the node that comprises information needed in the XML tree and nodal information is taken out the data that are converted to the structure type and is placed in the structure array.
Program circuit at first defines DOM document and element variable as shown in Figure 4, loads the XML tree, judges that then whether the subsystem sequence number is maximum, then finishes in this way; As not being then to calculate this subsystem node sum, get subsystem node insert structure body array correspondence position, whether the decision node number is maximum again, returns in this way and judges whether maximum step of subsystem sequence number, as not being to turn back to get the subsystem node step, circulate until end successively.
Last by reference to the accompanying drawings 5 and specific embodiment the generation of the database in the dynamic database technology of the present invention is described in detail.
In background data base, set up simulation object database type according to the resulting simulation object model information of analyzing XML file, this database model is the base table of database, it defines the simulation architecture structure of data table, and all database word bank tables all will be inherited and derivation from this base table; The Database Dynamic generating algorithm is as follows:
(1) connects the background database manager system;
(2) adopt the technology of trie tree from the structure array of depositing parameter information, to take out needed information;
(3) write the required SQL statement of modeling and parameter information comprised wherein;
(4) submit and carry out SQL statement to, corresponding database is set up on the backstage.
Program flow diagram begins also to connect background data base as shown in Figure 5, judges whether base table is arranged in the background data base, if any then deletion, does not then read model information, creates SQL statement, submits also execution SQL statement to, and corresponding database is set up on the backstage.
The XML file had been realized the conversion of several data form and the generation of data model as intermediary during entire database was set up, eliminated the restriction to data source, corresponding change also takes place in the information of database model when changing with the simulation object model information, the structure of the database model of setting up also changes thereupon, database can change along with the change of simulation object data model, reduced and manually set up the existing a series of problems of database model, realize the database dynamic generation, made a database to be shared by a plurality of emulation platforms.
The above is preferred embodiment of the present invention only, is not in order to limit application range of the present invention; All other do not break away from the equivalence of finishing under the disclosed essence and change or modification, all should be included in following claims scope.

Claims (6)

1. database dynamic banking process is characterized in that: described method comprises the generation of XML tree, the generation of data model, three steps of generation of database successively; Earlier by defining mapping ruler, write the XML template, loading XML template generation XML tree; Adopt DOM that needed information is parsed from XML tree then, the program of converting thereof into can the recognition data structure, is placed in the structure array; Connect the background database manager system, needed information is also taken out in retrieval from the structure array of depositing parameter information, writes the required SQL statement of modeling and parameter information is comprised wherein, submits to and also carries out SQL statement, and corresponding database is set up on the backstage.
2. database dynamic banking process as claimed in claim 1, it is characterized in that: define mapping ruler in the generation step of described XML tree, be mainly root node of definition, come mark with DATA, database name is referred to as the child node of DATA, mark with DATABASE, node content is database-name; The subtree of each tables of data as DATA, to mark with TABLE, and for it inserts a child node, mark with TABLENAME, node content is the title of table; Each line item in the table as the subtree of corresponding TABLE, is used the VAR mark, the child node of the needed field of every record as VAR, and mark with corresponding field name, node content is the corresponding record value of each field.
3. database dynamic banking process as claimed in claim 1, it is characterized in that: in the generation step of described XML tree, the child node that each subsystem node of XML tree comprises mainly contains the child node sum of the sequence number of this subsystem, floating type that subsystem comprises, integer, character type, all variable node, the content that each variable node comprises are decided according to system's needs under this system, comprise variable name, types of variables, corresponding reflective memory address, physical significance usually.
4. database dynamic banking process as claimed in claim 1, it is characterized in that: in the generation step of described data model, be to be used for depositing the data that parsing obtains according to structure array of organization definition that XML sets, load whole XML tree, circulation is at last taken out the node that comprises information needed in the XML tree and the data that nodal information is converted to the structure type is placed in the structure array.
5. database dynamic banking process as claimed in claim 1, it is characterized in that: described employing DOM parses needed information from the XML tree, both can resolve whole XML tree fully, comprise the node of user's information needed during also only analyzing XML is set, decide according to the information that modeling is required.
6. as any described database dynamic banking process of claim 1~5, it is characterized in that:
The XML file had been realized the conversion of several data form and the generation of data model as intermediary during entire database was set up, corresponding change also takes place in the information of database model when the simulation object model information changes, the structure of the database model of setting up also changes thereupon, database can change along with the change of simulation object data model, has realized the database dynamic generation.
CN2012100225595A 2012-02-02 2012-02-02 Dynamic database building method Pending CN103246649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100225595A CN103246649A (en) 2012-02-02 2012-02-02 Dynamic database building method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100225595A CN103246649A (en) 2012-02-02 2012-02-02 Dynamic database building method

Publications (1)

Publication Number Publication Date
CN103246649A true CN103246649A (en) 2013-08-14

Family

ID=48926174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100225595A Pending CN103246649A (en) 2012-02-02 2012-02-02 Dynamic database building method

Country Status (1)

Country Link
CN (1) CN103246649A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104361140A (en) * 2014-12-10 2015-02-18 用友软件股份有限公司 Dynamically generated data model configuration device and method
CN104794236A (en) * 2015-05-07 2015-07-22 中国测绘科学研究院 Map making rule construction and structured organization method and system thereof
CN105160012A (en) * 2015-09-23 2015-12-16 烽火通信科技股份有限公司 Management system and method of heterogeneous database

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5806066A (en) * 1996-03-26 1998-09-08 Bull Hn Information Systems Inc. Method of integrating schemas of distributed heterogeneous databases
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data
CN101901262A (en) * 2010-07-26 2010-12-01 北京新洲协同软件技术有限公司 Object-oriented model-based enterprise database construction and service data display method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5806066A (en) * 1996-03-26 1998-09-08 Bull Hn Information Systems Inc. Method of integrating schemas of distributed heterogeneous databases
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data
CN101901262A (en) * 2010-07-26 2010-12-01 北京新洲协同软件技术有限公司 Object-oriented model-based enterprise database construction and service data display method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张博: "基于Zhang编码的XML与关系数据库中间件的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 11, 15 November 2008 (2008-11-15), pages 1 - 33 *
段春虎 等: "XML存储结构在仿真数据库中的应用研究", 《计算机仿真》, vol. 25, no. 2, 15 February 2008 (2008-02-15), pages 33 - 36 *
百度百科: "XPath", 《HTTP://BAIKE.BAIDU.COM/HISTORY/XPATH/21809123》, 15 July 2011 (2011-07-15), pages 1 - 4 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104361140A (en) * 2014-12-10 2015-02-18 用友软件股份有限公司 Dynamically generated data model configuration device and method
CN104361140B (en) * 2014-12-10 2018-11-16 用友网络科技股份有限公司 Dynamic generation data model configuration device and method
CN104794236A (en) * 2015-05-07 2015-07-22 中国测绘科学研究院 Map making rule construction and structured organization method and system thereof
CN104794236B (en) * 2015-05-07 2018-04-20 中国测绘科学研究院 A kind of map making rule structure and its structured organization method and system
CN105160012A (en) * 2015-09-23 2015-12-16 烽火通信科技股份有限公司 Management system and method of heterogeneous database
CN105160012B (en) * 2015-09-23 2019-03-26 烽火通信科技股份有限公司 A kind of management method and system of heterogeneous database

Similar Documents

Publication Publication Date Title
CN101595474B (en) Linguistic analysis
CN102033954B (en) Full text retrieval inquiry index method for extensible markup language document in relational database
US8825621B2 (en) Transformation of complex data source result sets to normalized sets for manipulation and presentation
CN107329961A (en) A kind of method of cloud translation memory library Fast incremental formula fuzzy matching
CN102982095B (en) A kind of body automatic creation system based on thesaurus and method thereof
CN101493820A (en) Medicine Regulatory industry knowledge base platform and construct method thereof
US10613841B2 (en) Task UI layout representing semantical relations
CN101458692A (en) Strategic material industry knowledge base platform and construct method thereof
CN108351768A (en) The method for writing document with markup language
CN101901265A (en) Objectification management system of virtual test data
CN101408909B (en) Method for describing product information model
CN103309239A (en) Multilevel information management and communication method
CN108766507A (en) A kind of clinical quality index calculating method based on CQL Yu standard information model openEHR
CN103246649A (en) Dynamic database building method
CN108351869A (en) Being parsed based on collection for linguistic analysis is executed for computer
CN101452459B (en) System for searching similar translation result by utilizing indexes and method thereof
CN110717014B (en) Ontology knowledge base dynamic construction method
WO2023103914A1 (en) Text sentiment analysis method and device, and computer-readable storage medium
CN101719162A (en) Multi-version open geographic information service access method and system based on fragment pattern matching
Budiwati et al. Word reordering on multiple pivots for the Japanese and Indonesian language pair
CN104598636A (en) Complex document separating and organizing method and complex document automatic generating method
US8719693B2 (en) Method for storing localized XML document values
CN109582662A (en) A kind of dynamic database building method in Management System Data library
Bisschop et al. Selected aspects of a general algebraic modeling language
US20230119613A1 (en) Generating model training data from a domain specification

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130814