CN108804480A - A kind of analyzing platform and design method of novel dynamic generation data operation commands - Google Patents
A kind of analyzing platform and design method of novel dynamic generation data operation commands Download PDFInfo
- Publication number
- CN108804480A CN108804480A CN201710312718.8A CN201710312718A CN108804480A CN 108804480 A CN108804480 A CN 108804480A CN 201710312718 A CN201710312718 A CN 201710312718A CN 108804480 A CN108804480 A CN 108804480A
- Authority
- CN
- China
- Prior art keywords
- data
- data model
- attribute
- module
- model
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention discloses a kind of analyzing platform and design method of novel dynamic generation data operation commands, including data model parsing module, data model member data normalized checking module, Sql orders generation module and calling service module, it is characterized in that, the output end of the calling service module is connect with the input terminal of data model parsing module, and the output end of the Sql orders generation module is connect with the input terminal of calling service module.Method has the following steps:Data model with it includes member property mark the attribute-bit based on reflection technology, data model example is analyzed by analysis program, corresponding newly-increased, modification is generated according to mark rule, delete the Sql language codes needed for data and the program called is transferred to execute.The present invention can reach compatible height, stability height, can substantially shorten in Information software project development process development cycle of the data Layer in terms of database manipulation, and be obviously improved the advantageous effect of code specification.
Description
Technical field
The invention belongs to technical field of computer information processing, more particularly to a kind of novel dynamic generation data operation commands
Analyzing platform and design method.
Background technology
With the development of computer information technology, used software systems scale is also increasing.In office system, pipe
Reason type system and information issuing system, e-commerce system etc. fields are directed to Database Systems, what software systems were related to
Data are stored in the database mostly.
During above type of software system development, need to deposit the corresponding data of each tables of data exploitation
It takes, parsing function.In practical applications, due to the difference of input data source and presentation mode, often there is a tables of data pair
Answer one or more data models.When updating the data the corresponding tables of data in library, specific aim is needed to write increase, modification, deletion
The Sql command codes of data.In the process, to the data type of each member, data length (size), each word in data model
Effect (major key certainly increase type column, unique key) of the section in tables of data is handled.It is relatively more in software systems larger data table
When, corresponding Sql command codes are also by proportional increase.More in business module, when tables of data quantity is big, workload is non-
Chang great can occupy a large amount of project development period.
In the project of team unity, due to the technical strength of developer and the difference of coding style, software can be caused
Quality control difficulty is big in systems development process, and normalization, robustness, the maintainability of program also will be with the increasings of system scale
Add and constantly improve difficulty, stability and data processing preciseness, the correctness of software systems are difficult to control, and are occupied very
The development time of large scale, increase the testing cost and maintenance time of software, software project development is very high with maintenance cost.
Invention content
The present invention for the technical problems in the prior art, provides a kind of novel dynamic generation data operation commands
Analyzing platform and design method can reach compatible height, stability height, can substantially shorten in Information software project development process
The database manipulation development cycle, and it is obviously improved the advantageous effect of code specification.
In order to solve the above technical problems, the technical solution adopted by the present invention is:A kind of novel dynamic generation data manipulation life
The analyzing platform of order, including data model parsing module, data model member data normalized checking module, Sql orders generation mould
Block and calling service module,
The output end of the calling service module is connect with the input terminal of data model parsing module, the data model solution
The output end of analysis module is connect with the input terminal of data model member data normalized checking module, the data model member data
The output end of normalized checking module is connect with the input terminal of Sql order generation modules, the output end of the Sql orders generation module
It is connect with the input terminal of calling service module.
Preferably, the data model parsing module, for parsing data table information corresponding to data model, field
Information, and parse the constraint of data sheet field and value range corresponding to each member property.
Preferably, the data model member data normalized checking module, for parsing data model and tables of data pair
Answer the compliance of field value.
Preferably, the Sql orders generation module, for that will be parsed and data fit data model definitions specification
Model data be translated as Sql orders, and order is returned into calling service module.
A kind of design method of novel dynamic generation data operation commands, includes the following steps,
(1) after analyzing platform receives model analyzing request, judge whether data model has tables of data identity property, such as
Fruit does not have tables of data identity property then to terminate to parse work, returns and terminates parsing reason and exit analyzing platform;Have, carries out next
Step;
(2) data table name and the owner in the Data Identification attribute of parsing data model;
(3) data model member property traversal is carried out, parsing is skipped when member property is without field identification attribute, continues to examine
Look into next member property;When member property has field identification attribute, next step is carried out;
(4) various data types, format and the constraints such as sub- attribute field name, the data type in field identification attribute are checked
Description information;
(5) it uses the constraint information obtained in step (4) to verify data model member attribute value, works as verification result
When meeting the constraint rule that member property defines, continue the parsing of next member property, otherwise terminates to parse work, return terminates
Parsing reason simultaneously exits analyzing platform;After all member properties of data model check, and in all member properties at least
There are one member properties to have field identification attribute, carries out next step;
(6) it is identified according to data model tables of data and is generated with member property value with the member property respectively with field identification
Sql orders return to the Sql orders of generation and exit data model analyzing platform, otherwise terminate to parse work, return and terminate parsing
Reason simultaneously exits analyzing platform.
Preferably, when establishing data model, " tables of data " attribute is identified in model class, and table name and the owner are set
Information;" field identification " attribute is set in data model on member property corresponding with tables of data, is arranged according to actual conditions
The sub- attribute field of " field identification " attribute;Sub- range of attributes be used to reflect the characteristic of corresponding data sheet field with about
Beam;" tables of data " attribute is parsed and is handled for data model analyzing platform with " field identification " attribute.
Own preferably, analyzing platform identifies the corresponding database table of generation model according to " tables of data " of data model
Person and title, according in " field identification " of data model member field name, whether generate corresponding Sql from adding attribute
More newer field, by the attribute field data type of data model, attribute value generation updated value, and most according to " field identification "
Long length with whether allow to carry out normative constraint for sky;Whether it is to add certainly, is whether unique in being identified according to " field identification "
Key, whether major key determines the constraints of the Sql command codes of generation.
Compared with prior art, advantageous effect possessed by the present invention is:Development approach through the invention establishes data
Model, the data model analyzing platform by the present invention carry out entity data model parsing and generate Sql orders, without being grasped to data
Make layer individually to be encoded, or need to only encode on a small quantity, size of code can be significantly reduced especially for large software system, improves
Development efficiency;Sql sentences needed for database update using the method are dynamic generation, so simultaneously specification to greatest extent
Sql command code formats effectively reduce problem difficult in maintenance caused by due to writing style difference, improve the close friend of code
Property and terseness;Simultaneously because Sql orders result from data model analyzing platform, also have in terms of safeguarding with extension very big excellent
Gesture.
Description of the drawings
Fig. 1 is the data model description figure of the present invention;
Fig. 2 is the analyzing platform work flow diagram of the present invention;
Fig. 3 is the analyzing platform function structure chart of the present invention.
Specific implementation mode
To make those skilled in the art be better understood from technical scheme of the present invention, in the following with reference to the drawings and specific embodiments
It elaborates to the present invention.
Embodiment of the invention discloses that a kind of platform and method carrying out data manipulation by data model, as schemed institute
Show,
A kind of analyzing platform of novel dynamic generation data operation commands, including data model parsing module, data model
Member data normalized checking module, Sql orders generation module and calling service module,
The output end of calling service module is connect with the input terminal of data model parsing module, data model parsing module
Output end is connect with the input terminal of data model member data normalized checking module, data model member data normalized checking module
Output end connect with the input terminal of Sql order generation modules, the output ends of Sql order generation modules and calling service module
Input terminal connects.
In the present embodiment, data model parsing module, for parsing data table information corresponding to data model, field
Information, and parse the constraint of data sheet field and value range corresponding to each member property.
In the present embodiment, data model member data normalized checking module, for parsing data model and tables of data pair
Answer the compliance of field value.
In the present embodiment, Sql orders generation module, for that will be parsed and data fit data model definitions specification
Model data be translated as Sql orders, and order is returned into calling service module.
A kind of design method of novel dynamic generation data operation commands, includes the following steps,
(1) after analyzing platform receives model analyzing request, judge whether data model has tables of data identity property, such as
Fruit does not have tables of data identity property then to terminate to parse work, returns and terminates parsing reason and exit analyzing platform;Have, carries out next
Step;
(2) data table name and the owner in the Data Identification attribute of parsing data model;
(3) data model member property traversal is carried out, parsing is skipped when member property is without field identification attribute, continues to examine
Look into next member property;When member property has field identification attribute, next step is carried out;
(4) various data types, format and the constraints such as sub- attribute field name, the data type in field identification attribute are checked
Description information;
(5) it uses the constraint information obtained in step (4) to verify data model member attribute value, works as verification result
When meeting the constraint rule that member property defines, continue the parsing of next member property, otherwise terminates to parse work, return terminates
Parsing reason simultaneously exits analyzing platform;After all member properties of data model check, and in all member properties at least
There are one member properties to have field identification attribute, carries out next step;
(6) it is identified according to data model tables of data and is generated with member property value with the member property respectively with field identification
Sql orders return to the Sql orders of generation and exit data model analyzing platform, otherwise terminate to parse work, return and terminate parsing
Reason simultaneously exits analyzing platform.
In the present embodiment, when establishing data model, " tables of data " attribute is identified in model class, and table name and institute are set
The person's of having information;" field identification " attribute is set in data model on member property corresponding with tables of data, according to actual conditions
The sub- attribute field of " field identification " attribute is set;Sub- range of attributes be used to reflect the characteristic of corresponding data sheet field with
Constraint;" tables of data " attribute is parsed and is handled for data model analyzing platform with " field identification " attribute.
In the present embodiment, analyzing platform is identified according to " tables of data " of data model generates the corresponding database table of model
The owner and title, according in " field identification " of data model member field name, whether from add attribute generate it is corresponding
Sql more newer fields, by the attribute field data type of data model, attribute value generation updated value, and according to " field mark
Know " maximum length with whether allow to carry out normative constraint for sky;Whether it is to add certainly, be in being identified according to " field identification "
No unique key, whether major key determines the constraints of the Sql command codes of generation.
It is described the invention in detail above by embodiment, but the content is only the exemplary implementation of the present invention
Example should not be construed as limiting the practical range of the present invention.Protection scope of the present invention is defined by the claims.All utilizations
Technical solutions according to the invention or those skilled in the art are under the inspiration of technical solution of the present invention, in the reality of the present invention
In matter and protection domain, designs similar technical solution and reach above-mentioned technique effect, or to made by application range
All the changes and improvements etc., the patent that should all still belong to the present invention cover within protection domain.
Claims (7)
1. a kind of analyzing platform of novel dynamic generation data operation commands, including data model parsing module, data model at
Member's data standard checks module, Sql orders generation module and calling service module, which is characterized in that
The output end of the calling service module is connect with the input terminal of data model parsing module, and the data model parses mould
The output end of block is connect with the input terminal of data model member data normalized checking module, the data model member data specification
Check that the output end of module is connect with the input terminal of Sql order generation modules, the output end and industry of the Sql orders generation module
The input terminal connection of business calling module.
2. a kind of analyzing platform of novel dynamic generation data operation commands according to claim 1, which is characterized in that institute
Data model parsing module is stated, for parsing data table information, field information corresponding to data model, and parses each member
The constraint of data sheet field corresponding to attribute and value range.
3. a kind of analyzing platform of novel dynamic generation data operation commands according to claim 1, which is characterized in that institute
State data model member data normalized checking module, the compliance for parsing data model and tables of data corresponding field value.
4. a kind of analyzing platform of novel dynamic generation data operation commands according to claim 1, which is characterized in that institute
Sql order generation modules are stated, for will be parsed and the model data of data fit data model definitions specification is translated as Sql
Order, and order is returned into calling service module.
5. a kind of design method of novel dynamic generation data operation commands, which is characterized in that include the following steps,
(1) after analyzing platform receives model analyzing request, judge whether data model has tables of data identity property, if do not had
Tables of data identity property then terminates to parse work, returns and terminates parsing reason and exit analyzing platform;Have, carries out next step;
(2) data table name and the owner in the Data Identification attribute of parsing data model;
(3) data model member property traversal is carried out, parsing is skipped when member property is without field identification attribute, continues checking for down
One member property;When member property has field identification attribute, next step is carried out;
(4) retouching for the various data types such as sub- attribute field name, the data type in field identification attribute, format and constraint is checked
State information;
(5) constraint information obtained in step (4) is used to verify data model member attribute value, when verification result meets
When the constraint rule that member property defines, continue the parsing of next member property, otherwise terminates to parse work, return and terminate parsing
Reason simultaneously exits analyzing platform;After all member properties of data model check, and at least one in all member properties
A member property has field identification attribute, carries out next step;
(6) it is identified according to data model tables of data and generates Sql lives with member property value with the member property respectively with field identification
It enables, returns to the Sql orders of generation and exit data model analyzing platform, otherwise terminate to parse work, return and terminate parsing reason
And exit analyzing platform.
6. a kind of design method of novel dynamic generation data operation commands according to claim 5, which is characterized in that
When establishing data model, " tables of data " attribute is identified in model class, and table name and owner information are set;In data model with
" field identification " attribute is set on the corresponding member property of tables of data, the sub- attribute of " field identification " attribute is set according to actual conditions
Field;Sub- range of attributes is used to reflect characteristic and the constraint of corresponding data sheet field;" tables of data " attribute and " field
Mark " attribute is parsed and is handled for data model analyzing platform.
7. a kind of design method of novel dynamic generation data operation commands according to claim 5, which is characterized in that solution
It analyses platform and the corresponding database table owner of generation model and title is identified according to " tables of data " of data model, according to data mould
Whether field name in " field identification " of type member generates corresponding Sql more newer fields from adding attribute, passes through data mould
Attribute field data type, the attribute value generation updated value of type, and according to the maximum length of " field identification " with whether allow for
Sky carries out normative constraint;In being identified according to " field identification " whether be from add, whether unique key, whether major key determines life
At Sql command codes constraints.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710312718.8A CN108804480A (en) | 2017-05-05 | 2017-05-05 | A kind of analyzing platform and design method of novel dynamic generation data operation commands |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710312718.8A CN108804480A (en) | 2017-05-05 | 2017-05-05 | A kind of analyzing platform and design method of novel dynamic generation data operation commands |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108804480A true CN108804480A (en) | 2018-11-13 |
Family
ID=64054642
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710312718.8A Pending CN108804480A (en) | 2017-05-05 | 2017-05-05 | A kind of analyzing platform and design method of novel dynamic generation data operation commands |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804480A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101046812A (en) * | 2006-06-12 | 2007-10-03 | 华为技术有限公司 | Method of data base table recording structure and detection and its device |
CN101067814A (en) * | 2007-05-10 | 2007-11-07 | 浪潮集团山东通用软件有限公司 | Mapping conversion method between data access level Xml format data and relational data |
CN101572622A (en) * | 2009-03-02 | 2009-11-04 | 南京联创科技股份有限公司 | Realization method for dynamically expanding resource metadata |
CN103136263A (en) * | 2011-11-23 | 2013-06-05 | 英业达股份有限公司 | Method of automatically generating SQL statement |
CN104361140A (en) * | 2014-12-10 | 2015-02-18 | 用友软件股份有限公司 | Dynamically generated data model configuration device and method |
US20150227562A1 (en) * | 2014-02-12 | 2015-08-13 | Kabushiki Kaisha Toshiba | Database device |
-
2017
- 2017-05-05 CN CN201710312718.8A patent/CN108804480A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101046812A (en) * | 2006-06-12 | 2007-10-03 | 华为技术有限公司 | Method of data base table recording structure and detection and its device |
CN101067814A (en) * | 2007-05-10 | 2007-11-07 | 浪潮集团山东通用软件有限公司 | Mapping conversion method between data access level Xml format data and relational data |
CN101572622A (en) * | 2009-03-02 | 2009-11-04 | 南京联创科技股份有限公司 | Realization method for dynamically expanding resource metadata |
CN103136263A (en) * | 2011-11-23 | 2013-06-05 | 英业达股份有限公司 | Method of automatically generating SQL statement |
US20150227562A1 (en) * | 2014-02-12 | 2015-08-13 | Kabushiki Kaisha Toshiba | Database device |
CN104361140A (en) * | 2014-12-10 | 2015-02-18 | 用友软件股份有限公司 | Dynamically generated data model configuration device and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020233330A1 (en) | Batch testing method, apparatus, and computer-readable storage medium | |
CN109670053B (en) | Data object mapping method, apparatus, device, and computer-readable storage medium | |
KR101758669B1 (en) | Matching metadata sources using rules for characterizing matches | |
US7328428B2 (en) | System and method for generating data validation rules | |
EP1381945B1 (en) | Method and system for reporting xml data based on precomputed context and a document object model | |
CN106528165A (en) | Code generation method and code generation system | |
CN101901265B (en) | Objectification management system of virtual test data | |
CN101908015A (en) | Device and method for creating test case based on components | |
CN107992306A (en) | A kind of avionics software interface realizes uniformity automatic check method | |
CN111309305B (en) | Smart contract-oriented code automatic recommendation method, system, computer equipment and storage medium | |
CN110188568A (en) | Confidential information identification method, device, device and computer-readable storage medium | |
CN114625349A (en) | Front-end page generation method, device, terminal device and storage medium | |
CN201435074Y (en) | Device for generating test case based on member | |
CN117389541A (en) | Configuration system and device for generating template based on dialogue retrieval | |
CN111125064A (en) | Method and device for generating database mode definition statement | |
CN116860856A (en) | Financial data processing method and device, computer equipment and storage medium | |
CN116755669A (en) | Low code development method and tool based on DSL language operation model | |
CN108766507A (en) | A kind of clinical quality index calculating method based on CQL Yu standard information model openEHR | |
CN107203525A (en) | The treating method and apparatus of database | |
CN113687827A (en) | Data list generation method, device and equipment based on widget and storage medium | |
CN112860584A (en) | Test method and device based on workflow model | |
CN108804480A (en) | A kind of analyzing platform and design method of novel dynamic generation data operation commands | |
CN116466917A (en) | Software modeling method based on artificial intelligence, computer equipment and storage medium | |
CN113868138A (en) | Method, system, equipment and storage medium for acquiring test data | |
CN113792055A (en) | Data processing method, electronic device and storage medium |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181113 |