CN103020318A - Method for maintenance of database tables in database - Google Patents
Method for maintenance of database tables in database Download PDFInfo
- Publication number
- CN103020318A CN103020318A CN2013100100626A CN201310010062A CN103020318A CN 103020318 A CN103020318 A CN 103020318A CN 2013100100626 A CN2013100100626 A CN 2013100100626A CN 201310010062 A CN201310010062 A CN 201310010062A CN 103020318 A CN103020318 A CN 103020318A
- Authority
- CN
- China
- Prior art keywords
- database
- xml
- field
- verification function
- database table
- 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
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for maintenance of database tables in a database. The method includes: 1) establishing an Xml table description container of a table structure with a father node and child nodes, wherein attributes in the father node are used for describing corresponding table entity classes, table names, descriptions, temporary table names and subordinative relations of the corresponding tables with other tables, and each child node represents a field; 2) establishing a data verification processor; 3) describing each database table by the aid of the Xml table description container to obtain an xml configuration file; 4) parsing the xml configuration files according to an inputted operation request, extracting the database table field corresponding to the operation request and operating the database table field according to the operation request; and 5) using the data verification processor for verifying the operated xml configuration files so as to maintain the database tables. By the method, efficiency of data operation is improved greatly, and further a great number of resources and research and development costs are saved.
Description
Technical field
The present invention relates to computing machine WEB development field, specifically, relate to a kind of method that database table in the database is safeguarded.
Background technology
In the web project, often can relate to repeat to database list table or multilist increase, delete, change, look into, import, derivation, verification operation be with the demand of completing user to the data operation.
At the WEB development field, be that each table is carried out independent code administration to the method for the main usefulness of operation of database table, then operate.When the table of operation was 1, the code that operates on it was 1; When the table of operation when being n, be n to the code of its operation.
Present this database table maintaining method has increased the redundancy of code like this, and error rate is also higher.The expansion of inconvenience code and management.
Summary of the invention
For the technical matters that exists in the prior art, the purpose of this method provides a kind of method that database table in the database is safeguarded.No matter the operation to database table repeats how many times, the method can be safeguarded a cover code, and corresponding file is configured and the attribute of change table field etc. according to demand.
Technical scheme of the present invention is:
A kind of method that database table in the database is safeguarded the steps include:
1) set up an Xml description list container, described Xml description list container is the list structure with father node and child node, and the attribute in the father node be used for to be described the entity class, table name, description, interim table name of corresponding table and belonged to relation with the son of other tables; Each child node represents a field;
2) set up a data check processor, wherein, described data check processor arranges a verification function to each field in the described xml configuration file;
3) adopt described Xml description list container that each database table is described, obtain respectively an xml configuration file;
4) according to the operation requests of input, described xml configuration file is resolved, extract database table field corresponding to this operation requests, and according to operation requests this database table field is operated;
5) adopt described data check processor, the xml configuration file after the operation is carried out verification, realize the maintenance to database table.
Further, the attribute in the child node comprises that the title, form types, data type of description field, whether verification, Form Element receive the longest number of characters.
Further, the verification function of described verification function for realizing by the javascript programming language.
Further, described verification function comprises: sex verification function, nonnumeric verification function, cell-phone number verification function.
Further, described operation requests comprises: increase, delete, change, look into, import, derive operation.
For realizing above purpose, this method has following a few part to consist of:
1.Xml configuration file:
Mainly comprise two parts: xml description list container, data check processor.
Xml description list container: represent a list structure by father node and his child node, the attribute in the father node be used for to be described the entity class, table name, description, interim table name of corresponding table and is belonged to relation with the son of other tables.Each child node represents a field, and the title of the attribute description corresponding field in the child node, form types, data type, whether verification, Form Element receive the longest number of characters etc.Behind the XML description list structure of container that defines thus, the XML that just can finish each database table describes, and namely is a kind of xml configuration file.
The attribute of XML node can freely expand according to the concrete function of table and delete, and XML itself has the characteristic of expansion and deletion of node attribute.
The data check processor: the verification function that processor is realized by the javascript programming language carries out verification to each field of describing the xml configuration file by xml description list container, the user table of representative of consumer, finish according to xml description list container and can be described as u table in the xml description document, wherein in the user table sex field is only allowed to occur the man, the woman, unknown three kinds, by the sex verification function in the data check processor sex field that all meet in the u list structured data is carried out verification.Data check processor herein can be realized the verification of different pieces of information field data, every kind of corresponding verification function of data field.The verification function realized by the javascript programming language, such as sex verification function, and nonnumeric verification function, cell-phone number verification function.Use during the in the end data manipulation of data check processor.
2. database manipulation interface
Use xml description list container that the structure of database table is described as the XML configuration file.Database manipulation interface section core is to set up the interface of a public analyzing XML configuration file, this interface be to realize in order to the analyzing XML configuration file by the java programming language.The descriptions of different tables can this public database manipulation Interface realization tables of data of mistake in the XML configuration file increases, deletes, changes, looks into, imports, derives operation.
Compared with prior art, good effect of the present invention is:
The present invention is by being packaged into a kind of XML file configuration with traditional data access (module, assembly, code), not only can effectively realize single multilist data manipulation that data manipulation can also be satisfied complexity of showing, and improved greatly the programmer in the efficient to the data operation, thereby saved a large amount of resources and R﹠D costs for R﹠D team or enterprise.
Description of drawings
Accompanying drawing is method flow diagram of the present invention.
Embodiment
1, passes through Xml description list container according to database table structure, use xml description field, field type attribute, length etc.; Each database table is described, obtains respectively an xml configuration file.In this operation two aspects are arranged, the one, single table handling: as long as want operation field in Xml description list container, to describe database table; The 2nd, multilist operates, and the net result of multilist operation is regarded as be single table, then by describing in the Xml description list container.
2, resolve by database manipulation interface xml configuration file, extract database table field corresponding to user's operation requests, and by user's operation the database table field is increased, deletes, changes, looks into, imports, derives operation by Interface realization to data sheet field.
3, when the additions and deletions by table from database change look into import and export the data of operation in obtaining showing after, by Xml data check processor each data is carried out verification, is finished the verification of different types of data, to obtain correct service data.
Although disclose for the purpose of illustration specific embodiments of the invention and accompanying drawing, its purpose is to help to understand content of the present invention and implement according to this, but it will be appreciated by those skilled in the art that: without departing from the spirit and scope of the invention and the appended claims, various replacements, variation and modification all are possible.The present invention should not be limited to this instructions most preferred embodiment and the disclosed content of accompanying drawing, and the scope of protection of present invention is as the criterion with the scope that claims define.
Claims (5)
1. the method that database table in the database is safeguarded the steps include:
1) set up an Xml description list container, described Xml description list container is the list structure with father node and child node, and the attribute in the father node be used for to be described the entity class, table name, description, interim table name of corresponding table and belonged to relation with the son of other tables; Each child node represents a field;
2) set up a data check processor, wherein, described data check processor arranges a verification function to each field in the described xml configuration file;
3) adopt described Xml description list container that each database table is described, obtain respectively an xml configuration file;
4) according to the operation requests of input, described xml configuration file is resolved, extract database table field corresponding to this operation requests, and according to operation requests this database table field is operated;
5) adopt described data check processor, the xml configuration file after the operation is carried out verification, realize the maintenance to database table.
2. the method for claim 1 is characterized in that attribute in the child node comprises that the title, form types, data type of description field, whether verification, Form Element receive the longest number of characters.
3. method as claimed in claim 1 or 2 is characterized in that the verification function of described verification function for realizing by the javascript programming language.
4. method as claimed in claim 3 is characterized in that described verification function comprises: sex verification function, nonnumeric verification function, cell-phone number verification function.
5. the method for claim 1 is characterized in that described operation requests comprises: increase, delete, change, look into, import, derive operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100100626A CN103020318A (en) | 2013-01-10 | 2013-01-10 | Method for maintenance of database tables in database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013100100626A CN103020318A (en) | 2013-01-10 | 2013-01-10 | Method for maintenance of database tables in database |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103020318A true CN103020318A (en) | 2013-04-03 |
Family
ID=47968921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013100100626A Pending CN103020318A (en) | 2013-01-10 | 2013-01-10 | Method for maintenance of database tables in database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103020318A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103440272A (en) * | 2013-08-05 | 2013-12-11 | 北京康邦科技有限公司 | Database maintenance method and device |
CN103577580A (en) * | 2013-11-07 | 2014-02-12 | 北京锐安科技有限公司 | Method and device for exporting data from database |
CN107274147A (en) * | 2017-05-31 | 2017-10-20 | 成都明途科技有限公司 | Numerical data statistical method based on matrix form data management |
CN107992519A (en) * | 2017-10-31 | 2018-05-04 | 中国电力科学研究院有限公司 | The multi-source heterogeneous data verification system and method for a kind of smart grid-oriented big data |
CN108471433A (en) * | 2018-01-25 | 2018-08-31 | 中国平安人寿保险股份有限公司 | A kind of synchronization message verification method of reseptance, system and the storage medium of configurationization |
CN109800331A (en) * | 2018-12-19 | 2019-05-24 | 山东中创软件工程股份有限公司 | Method for reading data and device, date storage method and device |
CN112784535A (en) * | 2021-01-25 | 2021-05-11 | 南京思迈恩传媒科技有限公司 | Algorithm for intelligently converting JSON (Java Server object notation) and XML (extensible markup language) format data into traditional data table format |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050097187A1 (en) * | 2003-10-10 | 2005-05-05 | Oracle International Corporation | Object relational mapping layer |
CN102566990A (en) * | 2010-12-09 | 2012-07-11 | 北大方正集团有限公司 | Method and device for performing data manipulation in Java application |
CN102819609A (en) * | 2012-08-23 | 2012-12-12 | 国电南京自动化股份有限公司 | Modeling method for persisting data model |
-
2013
- 2013-01-10 CN CN2013100100626A patent/CN103020318A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050097187A1 (en) * | 2003-10-10 | 2005-05-05 | Oracle International Corporation | Object relational mapping layer |
CN102566990A (en) * | 2010-12-09 | 2012-07-11 | 北大方正集团有限公司 | Method and device for performing data manipulation in Java application |
CN102819609A (en) * | 2012-08-23 | 2012-12-12 | 国电南京自动化股份有限公司 | Modeling method for persisting data model |
Non-Patent Citations (2)
Title |
---|
张波: "基于Java的数据库访问引擎的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 06, 15 December 2007 (2007-12-15) * |
李亚洁 等: "基于xml的柔性数据校验系统的设计与实现", 《信息系统工程》, no. 04, 20 April 2011 (2011-04-20), pages 26 - 27 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103440272A (en) * | 2013-08-05 | 2013-12-11 | 北京康邦科技有限公司 | Database maintenance method and device |
CN103577580A (en) * | 2013-11-07 | 2014-02-12 | 北京锐安科技有限公司 | Method and device for exporting data from database |
CN107274147A (en) * | 2017-05-31 | 2017-10-20 | 成都明途科技有限公司 | Numerical data statistical method based on matrix form data management |
CN107992519A (en) * | 2017-10-31 | 2018-05-04 | 中国电力科学研究院有限公司 | The multi-source heterogeneous data verification system and method for a kind of smart grid-oriented big data |
CN108471433A (en) * | 2018-01-25 | 2018-08-31 | 中国平安人寿保险股份有限公司 | A kind of synchronization message verification method of reseptance, system and the storage medium of configurationization |
CN108471433B (en) * | 2018-01-25 | 2021-07-13 | 中国平安人寿保险股份有限公司 | Configurated synchronous message verification receiving method, system and storage medium |
CN109800331A (en) * | 2018-12-19 | 2019-05-24 | 山东中创软件工程股份有限公司 | Method for reading data and device, date storage method and device |
CN112784535A (en) * | 2021-01-25 | 2021-05-11 | 南京思迈恩传媒科技有限公司 | Algorithm for intelligently converting JSON (Java Server object notation) and XML (extensible markup language) format data into traditional data table format |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103020318A (en) | Method for maintenance of database tables in database | |
CN106528129B (en) | A kind of Web application interface generation system and method | |
Sevilla Ruiz et al. | Inferring versioned schemas from NoSQL databases and its applications | |
CN110196971A (en) | Online document edit methods, device, terminal device and storage medium | |
CN104679903B (en) | The operating method and device of a kind of tables of data | |
US20060251073A1 (en) | Methods and apparatus for transferring data | |
US8140596B2 (en) | System and method for the derivation and application of sub-iteration contexts in a transformation operation in a data integration system | |
US20080183689A1 (en) | Search method and apparatus for plural databases | |
CN106407302B (en) | It supports to call the special functional method of middleware database by Simple SQL | |
US10296505B2 (en) | Framework for joining datasets | |
CN101382893B (en) | On-line assembling method for component based on Web service | |
CN109408043A (en) | A kind of program creating method and device | |
CN103559025A (en) | Software refactoring method through clustering | |
CN104881490A (en) | WEB form data access method and system | |
CN103927385A (en) | Unifying method and device of data model | |
JP2012524930A (en) | Database management method and system | |
CN102053987B (en) | For showing the unified interface with Update Table array | |
WO2013071336A1 (en) | A method and structure for managing multiple electronic forms and their records using a static database | |
CN107908390A (en) | A kind of extended method and system of WebGIS applications | |
CN111782653A (en) | Data query method and device, electronic equipment and storage medium | |
CN102073702A (en) | Personnel information dynamic-extension realizing method for human resource management information system | |
US10387493B2 (en) | Methods for converting an XML artifact into a topic map instance and devices thereof | |
CN103593182A (en) | Method for reconfiguring software by using clustering mode | |
CN104573053A (en) | Configuration item template dynamic customizing method based on XML | |
CN110716913B (en) | Mutual migration method of Kafka and Elasticissearch database data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130403 |