Nothing Special   »   [go: up one dir, main page]

CN102819609B - A kind of perdurable data model modelling approach - Google Patents

A kind of perdurable data model modelling approach Download PDF

Info

Publication number
CN102819609B
CN102819609B CN201210303133.7A CN201210303133A CN102819609B CN 102819609 B CN102819609 B CN 102819609B CN 201210303133 A CN201210303133 A CN 201210303133A CN 102819609 B CN102819609 B CN 102819609B
Authority
CN
China
Prior art keywords
data
data model
business datum
model
business
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.)
Active
Application number
CN201210303133.7A
Other languages
Chinese (zh)
Other versions
CN102819609A (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.)
Guodian Nanjing Automation Co Ltd
Original Assignee
Guodian Nanjing Automation 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 Guodian Nanjing Automation Co Ltd filed Critical Guodian Nanjing Automation Co Ltd
Priority to CN201210303133.7A priority Critical patent/CN102819609B/en
Publication of CN102819609A publication Critical patent/CN102819609A/en
Application granted granted Critical
Publication of CN102819609B publication Critical patent/CN102819609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention discloses a kind of perdurable data modeling method, comprises following step: step 1: the mode adopting XML, the data pattern file after definition modeling; Step 2: drive engine dynamically to generate business datum storehouse table corresponding to data model by data model; Step 3: data model drives engine automatically verify according to data model and preserve business datum. The database design method that the modeling of business datum is replaced off-line is realized by data modeling, will fast and flexible data model be changed. Data model is set up and will dynamically be changed corresponding business datum table with change, business datum carries out modeling and amendment fast, substantially reduces the construction cycle of model, and reduces owing to data model change causes the chaotic equivalent risk of data mistake. Business datum is automatically processed by data-droved engine according to data model, greatly improves the tempo of development of system, decreases the system problem caused by different data processing code.

Description

A kind of perdurable data model modelling approach
Technical field
The present invention relates to a kind of Data Modeling Method, belong to technical field of data processing.
Background technology
At present, the persistence medium of systemic software development is substantially all relevant database, and adopting maximum in system design is exactly to utilizing database design instrument to carry out the method for the modeling of business model after business demand analysis. The data model of the infosystem of major part all adopts the database design instruments such as similar PowerDesinger to design and develop, after data base administrator takes concrete business demand, by setting up the form of business datum table, business model is established in database.
The demand of user can often change, and in order to adapt to the change of business demand, data model also must change the change by directly causing database structure once data model changes. Current data model all adopts data modeling tool create and change, data base administration (DBM) personnel find former data model, Update Table model again is carried out according to the change of demand, such change amount is generally all bigger, and needs the people understood especially in original business datum storehouse just can make best change. Existing data modeling is all the mode adopting off-line, data model after having built also must be generated in actual data storehouse, this process be all generally manually or semi-automatic mode utilize database structure language these changes to be modified in actual data storehouse. Such process can produce many problems, first, change from data modeling to database needs the time grown very much, but also need to be proficient in very much original data base administration (DBM) personnel and modify maintenance, changes in demand frequently after inconvenient, the demand that can not adapt to crucial user fast changes, and business analyzes personnel to be needed to find the content changed in original business datum, after these contents being analyzed, original business model could be reconstructed. After reconstruct business model, in addition it is also necessary to these changes changed in the database used, this process will for a long time lastingly; Secondly, original data also likely can be had an impact by the database after changing, it is possible to part data can be caused to lose, and data mistake etc. are abnormal, directly cause infosystem normally not use.
Summary of the invention
In order to the structure of data model can be changed flexibly, do not cause again data with existing to lose the problems such as mistake, present invention employs the data modeling based on expandable mark language XML. Utilizing the modeling method based on XML, be kept in the structure of XML by the data structure of modeling, this kind of structure can tackle the change of demand fast.
The technical scheme of the present invention is to provide a kind of perdurable data modeling method, it is characterized in that, comprises following step:
Step 1: the mode adopting XML, the data pattern file after definition modeling;
Step 2: drive engine dynamically to generate business datum storehouse table corresponding to data model by data model;
Step 3: data model drives engine automatically verify according to data model and preserve business datum.
Data pattern file in step 1 adopts schema grammer in XML to set up.
In step 1, data pattern file is stored in data model Maintenance Table.
In step 2, data model drives engine first to set up in business some fields all needed, then data model drives engine meeting ergodic data model, for each business datum element, arrange according to the business datum in the title of data model and type automatically generated data storehouse table.
In step 2, unique mark according to data model generates business datum storehouse table as table name;
In the business datum storehouse table set up, comprising common data row and business datum row, drive engine just can be mapped with business datum storehouse table by data model by data model, data preserve and inquiry all utilizes data model to drive engine to process automatically.
The Schema that in step 3, business datum utilizes XML to carry before being saved in business datum storehouse table verifies.
The step preserving business datum in step 3 is:
Data model drives engine to utilize the business datum element of title Automatic Adaptation Data model, directly data model elements is assembled SQL statement as row name, and whether existed in the table of business datum storehouse according to data and determined to use INSERT or UPDATE operation;
Utilize the SQL statement after assembling, by database manipulation, namely business datum can be saved in the table of business datum storehouse.
Also comprise the step to business datum inquiry:
Data model drives engine automatically to assemble the database statement of inquiry according to data model definitions, obtains corresponding business datum by performing inquiry statement.
The useful effect that the present invention reaches:
The database design method of the replacement off-line of the modeling to business datum is realized by data modeling, will fast and flexible data model be changed, once data model changes, only need the data model that dynamically amendment is set up in systems in which, and each model changed content will be preserved.
Data model is set up and will dynamically be changed corresponding business datum table with change, business datum carries out modeling and amendment fast, substantially reduces the construction cycle of model, and reduces owing to data model change causes the chaotic equivalent risk of data mistake.
Business datum automatically can be processed by data-droved engine according to data model, developer without the need to carrying out the code development of data processing again to each business, greatly improve the tempo of development of system, decrease the system problem caused by different data processing code.
Embodiment
The invention will be further described below. Following examples are only for clearly illustrating the technical scheme of the present invention, and can not limit the scope of the invention with this.
The present invention adopts the thinking of model-driven, utilizes expandable mark language XML that data model is carried out modeling. The present invention mainly comprises following settlement steps to deal:
Step one, adopt XML(extensible markup language) mode, definition modeling after data pattern file;
Step 2, by data model drive engine dynamically generate business datum storehouse table corresponding to data model.
Step 3, data model drive engine automatically verify according to data model and preserve business datum.
Detailed data modeling step process is as follows:
1, data pattern file
Present method utilizes XML to preserve the data pattern file after modeling, utilizes the characteristic that XML can expand, and data model can change according to the carrying out that the change of business demand continues. Data pattern file adopts schema grammer in XML to set up, and the specific form of model file is as follows:
All configurations are all that the grammer based on XMLSchema configures, and the maximum advantage of XMLSchema is exactly can expand arbitrarily for the demand in future.
Xs:schema is the root node of data model, and this node mainly is used for defining some name spaces of XMLSchema.
What the xs:element under xs:schema was used for definition is the title of data model and affiliated name space, and name attribute representation's is the title of data model, will uniquely identify this data model with this name after definition. Schema model is the name space formulated and change data model. By schema and name two attributes, it is possible to automatically generating corresponding database table in business datum storehouse, wherein schema is the pattern name of table, and name is table name.
Xs:complexType element representation starts business element concrete in definition of data model.
The order of the business element below xs:all element assignment can arrange arbitrarily.
Xs:element below xs:all has formulated each business element in business data model, and final business datum is all to be retained in business element corresponding to these elements. Name attribute representation's is unique mark of business element, and what text represented is the title of this business element, and what type represented is the type of this business element, defines following several data type in XMLSchema:
1) xs:string character string type
2) xs:decimal float
3) xs:integer integer type
4) xs:boolean boolean Value Types
5) xs:date date type
6) xs:time time type
Specification and element introduction according to xs:schema just can formulate a concrete business model, and xml content below is a simple business data model example.
2, data pattern file stores
Data model after configuration will be saved in system, has the data model after the next special stored configuration of a business data model Maintenance Table in system.
Following table is the database structure storing data pattern file:
Wherein, code is that data model uniquely identifies, and name is the title of data model, and model saves the XML structure of data model.
Consider that the data model of different times has specific meaning, so needing to be saved in system by the data model of each version, the version field references version number of data model, up-to-date data model version number adds 1 on original maximum version basis, the time that this version of version_time field references is set up, it is possible to be used for reviewing the time of concrete data model amendment.
3, business datum storehouse table is dynamically generated
The data model definitions data structure of business, these data structures corresponding have a concrete business datum. Business datum is kept in the table of business datum storehouse by present method, and these database tables are generated by data model engine automatically when data model is set up.
Data model drives engine first can some fields all needed in business be set up, and then model-driven engine meeting ergodic data model, arranges according to the business in its title and type automatically generated data Kuku table for each business model element.
Following table is the content of business datum storehouse table:
First, unique mark according to data model generates business datum storehouse table as table name.
In the business datum storehouse table set up, id, item and time are three fixing row, and wherein id is the major key representing business datum, and item be then that master data corresponding to this business datum encodes, and time represents the time dimension degree that business datum relates to. These fields are the public field that business datum exists, it is possible to use these service fields carry out the operations such as data filter.
It is all concrete business datum row after common data arranges, these data rows are that the business datum element according to definition in data model generates, wherein row name is specified by business element name, data type is then specified by type, and engine changes into, according to the type that XMLSchema defines, the database field type that database can understand automatically.
Like this, driving engine just can be mapped with business datum storehouse table by data model by data model, data preserve and inquiry can utilize data model to drive engine to process automatically.
4, data processing
Data model drives engine automatically business datum can be operated according to the data model of definition. The operation of data is mainly divided into the following aspects:
1) data verification
Business datum has to pass through the verification of careful data before being saved in business datum storehouse table, and present method utilizes the verification of the Schema that XML carries to complete.
Business datum can being preserved into by data model the content of xml structure, utilize the schema of the xml after assembling and data model to verify, what verification mainly comprised is data type, data length etc. If verifying unsuccessful, then these business datums can not be saved in the table of business datum storehouse.
The similar following content of the data xml assembled by data model:
2) data preserve
Data, after successfully verification, will be saved in concrete traffic table. Data model drives engine still to assemble the statement of database insertion or renewal according to data model.
Data are after importing engine into, engine can utilize the business datum element of title Automatic Adaptation Data model, because the row name of business datum table is consistent with the business element of data model, so directly data model elements, as row name, SQL statement can be assembled, and whether exist in traffic table according to data and determined to use INSERT or UPDATE operation.
Utilize the SQL statement after assembling, by database manipulation, namely data can be saved in the table of business datum storehouse.
3) data query
Data model drives engine automatically to assemble the database statement of inquiry according to data model definitions, will obtain corresponding business datum by performing inquiry statement.
After obtaining business datum, engine is corresponding with traffic data field row according to data model elements, and the data after these correspondences will return to the function needing to use with unified data object.
The above is only the preferred embodiment of the present invention; it is noted that for those skilled in the art, under the prerequisite not departing from the technology of the present invention principle; can also making some improvement and distortion, these improve and distortion also should be considered as protection scope of the present invention.

Claims (6)

1. a perdurable data modeling method, is characterized in that, comprises following step:
Step 1: the mode adopting XML, the data pattern file after definition modeling;
Step 2: drive engine dynamically to generate business datum storehouse table corresponding to data model in data pattern file by data model;
Step 3: data model drives engine automatically verify according to the data model in data pattern file and preserve business datum;
The Schema that in step 3, business datum utilizes XML to carry before being saved in business datum storehouse table verifies;
The step preserving business datum in step 3 is:
Data model driving engine utilizes the business datum element of the title Automatic Adaptation Data model of data model, directly the business datum element of data model is assembled SQL statement as row name, and whether existed in the table of business datum storehouse according to data and determined to use INSERT or UPDATE operation;
Utilize the SQL statement after assembling, by database manipulation, namely business datum can be saved in the table of business datum storehouse.
2. perdurable data modeling method according to claim 1, is characterized in that, the data pattern file in step 1 adopts schema grammer in XML to set up.
3. perdurable data modeling method according to claim 1, is characterized in that, in step 1, data pattern file is stored in data model Maintenance Table.
4. perdurable data modeling method according to claim 1, it is characterized in that, in step 2, data model drives engine first to set up in business some fields all needed, then data model drives engine meeting ergodic data model, for each business datum element, arrange according to the business datum in the title of data model and type automatically generated data storehouse table.
5. perdurable data modeling method according to claim 1, is characterized in that, in step 2, unique mark according to data model generates business datum storehouse table as table name;
In the business datum storehouse table set up, comprising common data row and business datum row, drive engine just can be mapped with business datum storehouse table by data model by data model, data preserve and inquiry all utilizes data model to drive engine to process automatically.
6. perdurable data modeling method according to claim 1, is characterized in that, also comprises the step to business datum inquiry:
Data model drives engine automatically to assemble the database statement of inquiry according to data model definitions, obtains corresponding business datum by performing the database statement of inquiry.
CN201210303133.7A 2012-08-23 2012-08-23 A kind of perdurable data model modelling approach Active CN102819609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210303133.7A CN102819609B (en) 2012-08-23 2012-08-23 A kind of perdurable data model modelling approach

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210303133.7A CN102819609B (en) 2012-08-23 2012-08-23 A kind of perdurable data model modelling approach

Publications (2)

Publication Number Publication Date
CN102819609A CN102819609A (en) 2012-12-12
CN102819609B true CN102819609B (en) 2016-06-08

Family

ID=47303720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210303133.7A Active CN102819609B (en) 2012-08-23 2012-08-23 A kind of perdurable data model modelling approach

Country Status (1)

Country Link
CN (1) CN102819609B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049264A (en) * 2012-12-17 2013-04-17 国电南京自动化股份有限公司 Method for controlling business system by dynamic modeling of state machine
CN103020318A (en) * 2013-01-10 2013-04-03 北京锐安科技有限公司 Method for maintenance of database tables in database
CN103955370B (en) * 2014-04-28 2017-07-07 华为软件技术有限公司 A kind of persistence apparatus and method of domain object model
CN105183735B (en) * 2014-06-18 2019-02-19 阿里巴巴集团控股有限公司 The querying method and inquiry unit of data
CN107463603B (en) * 2017-06-16 2021-01-12 中国科学院计算机网络信息中心 Scientific research project life cycle data management customized control method and system based on quantitative DMP
CN107480186B (en) * 2017-07-07 2021-08-27 中国建设银行股份有限公司 Business model data processing method and computer equipment
CN109344199A (en) * 2018-09-20 2019-02-15 普元信息技术股份有限公司 The system and method for big data quantity distributed treatment is realized in cloud computing platform
CN109871381A (en) * 2019-01-22 2019-06-11 积成电子股份有限公司 The method that grid operation data is adaptively stored and inquired
CN111427867B (en) * 2020-03-30 2023-10-20 杭州华望系统科技有限公司 Model persistence method based on hybrid storage
CN111399838A (en) * 2020-06-04 2020-07-10 成都四方伟业软件股份有限公司 Data modeling method and device based on spark SQ L and materialized view
CN113312378B (en) * 2021-07-28 2022-02-01 阿里云计算有限公司 Modeling method, component, device, storage medium, and data warehouse creation system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data

Also Published As

Publication number Publication date
CN102819609A (en) 2012-12-12

Similar Documents

Publication Publication Date Title
CN102819609B (en) A kind of perdurable data model modelling approach
CN106528129B (en) A kind of Web application interface generation system and method
CN102779040B (en) A kind of method and apparatus generating customizing form
US7548542B2 (en) Methods and apparatus for transferring data
CN101908039B (en) Report template customizing system
US7792793B2 (en) Data export/import from multiple data source to a destination data repository using corresponding data exporters and an importer
CN105138501A (en) Configurable dynamic report generating method and system
CN106055528B (en) Document automatic generation method and device
CN102566990B (en) Method and device for performing data manipulation in Java application
CN107678736A (en) A kind of business Page Template shows method, system and computer installation
CN102646039A (en) Software interface generating system and method based on extensible markup language (XML) Schema
US20050114394A1 (en) Mapping XML schema components to qualified Java components
CN102023983B (en) Managing method of statistical space-time database
CN105373469A (en) Interface based software automation test method
DE60128895D1 (en) METHOD AND SCHEME TO USE XML SCHEMATA
CN103617047A (en) Method, device and processor for developing business processes
CN101714078A (en) Code generation method and device
CN102663103A (en) Configurable method for automatically generating database and accessing data
CN106873974A (en) Smart code generates automotive engine system and method
CN106372044A (en) Method for generating typed dimension XBRL (Extensible Business Reporting Language) report based on report form
CN105354036A (en) Database operation code generating method and apparatus
CN103903086A (en) Method and system for developing management information system based on service model driving
AU2012327168B2 (en) Amethod and structure for managing multiple electronic forms and their records using a static database
CN102591960A (en) Agricultural economy electronic map data service interface method
CN104462361A (en) Method and device for matching data in data table

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB03 Change of inventor or designer information

Inventor after: Zhu Haidong

Inventor after: Tang Yiliang

Inventor after: Li Xiaodong

Inventor after: Zhang Min

Inventor after: Huang Bingliang

Inventor after: Hu Yinhua

Inventor after: Sun Feng

Inventor before: Zhu Haidong

Inventor before: Li Xiaodong

Inventor before: Zhang Min

Inventor before: Huang Bingliang

Inventor before: Hu Yinhua

Inventor before: Sun Feng

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: ZHU HAIDONG LI XIAODONG ZHANG MIN HUANG BINGLIANG HU YINHUA SUN FENG TO: ZHU HAIDONG TANG YILIANG LI XIAODONG ZHANG MIN HUANG BINGLIANG HU YINHUA SUN FENG

C14 Grant of patent or utility model
GR01 Patent grant