CN103440272A - Database maintenance method and device - Google Patents

Database maintenance method and device Download PDF

Info

Publication number
CN103440272A
CN103440272A CN2013103379833A CN201310337983A CN103440272A CN 103440272 A CN103440272 A CN 103440272A CN 2013103379833 A CN2013103379833 A CN 2013103379833A CN 201310337983 A CN201310337983 A CN 201310337983A CN 103440272 A CN103440272 A CN 103440272A
Authority
CN
China
Prior art keywords
field
remarks
attribute
name
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
CN2013103379833A
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.)
BEIJING KANGBANG SCIENCE & TECHNOLOGY Co Ltd
Original Assignee
BEIJING KANGBANG SCIENCE & TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING KANGBANG SCIENCE & TECHNOLOGY Co Ltd filed Critical BEIJING KANGBANG SCIENCE & TECHNOLOGY Co Ltd
Priority to CN2013103379833A priority Critical patent/CN103440272A/en
Publication of CN103440272A publication Critical patent/CN103440272A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides a database maintenance method and device which are used for solving the problem of large workload in database maintenance in a product development process. The embodiment of the invention provides the database maintenance method which comprises the steps that when a table is built, remarks are added for the name of the table and every field of the table, and the remarks are stored in the remark attributes of the built table, wherein the remarks comprise the names and/or the attributes of the fields; when a page is maintained, the specified fields in the table and the corresponding remark information are obtained; the names of the fields in the remarks which correspond to each field are displayed as fixed parts, and different display forms are displayed according to the attributes of the fields in the remarks.

Description

A kind of database maintenance method and device
Technical field
The present invention relates to the Network Database Technique field, particularly a kind of database maintenance method and device.
Technical background
The computer application system of based on database adopts database table to carry out the storage entity data usually, and the data in physical data table are safeguarded to (increase, revise, delete, derive) is requisite function in this type systematic.Generally, need special-purpose database maintenance program or the module of exploitation to realize this class function.The maintenance program of physical data table is usually very similar, and this similarity causes in program comprising code simply a large amount of and that repeat.Often workload is very large to develop such program, and with low content of technology.The more important thing is, if application system changes because changes in demand causes database table structure, the database maintenance program must be revised accordingly, to adapt to these, changes, and this later maintenance to whole system is a very large burden.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of database maintenance method and device, utilizes the remarks fulfillment database to safeguard, effectively reduces code redundancy, has greatly improved development efficiency, has reduced maintenance cost.
The embodiment of the present invention provides a kind of database maintenance method, comprising:
While building table, be each field increase remarks of table name and table, and described remarks deposited in the remarks attribute of built table; Wherein, described remarks comprise the attribute of title and/or the field of field;
When the page is safeguarded, obtain specific field and corresponding remark information in table;
The name of field in the remarks of each Related fields is referred to as to fixed part and shows, and present the different forms that represents according to the attribute of field in remarks.
The embodiment of the present invention also provides a kind of database maintenance device, comprising:
Remarks add module, for when building table, are recorded as table name and show the remark information that each field increases, and described remarks are deposited in the remarks attribute of built table; Wherein, described remarks comprise the attribute of title and/or the field of field;
The data selection module, for when the page is safeguarded, obtain specific field and corresponding remark information in table;
Page display module, be referred to as fixed part for the name of the remarks field by each Related fields and show, and present the different forms that represents according to the attribute of field in remarks.
The database maintenance method and the device that utilize the embodiment of the present invention to provide, no matter in database, how many tables are arranged, no matter in maintenance process, database is carried out to what kind of additions and deletions and change operation, only utilize a set of maintenance program just can solve, realize that the mobilism of the page and data is processed.This mode effectively reduces code redundancy, has greatly improved development efficiency, has reduced maintenance cost.
The accompanying drawing explanation
Figure 1 shows that the database maintenance method flow diagram that the embodiment of the present invention provides.
Figure 2 shows that the present invention's one database presents example.
Figure 3 shows that the present invention's one database presents example.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described,
Figure 1 shows that the data general-purpose maintaining method process flow diagram that the embodiment of the present invention provides.As shown in Figure 1, the method comprises:
Step 101: while building table, be each field increase remarks of table name and table, and described remarks deposited in the remarks attribute of built table; Wherein, described remarks comprise the attribute of title and/or the field of field.
In an embodiment of the present invention, the remarks of some field may only comprise the title of field, and the remarks of some field may also further comprise the attribute of field.The title of field and the attribute of field can be isolated with other symbols of " comma " or definition.
In an embodiment of the present invention, the attribute of field comprises querying attributes, data type attribute or dictionary relating attribute.
Illustrate, can take following statement to build table:
Figure BDA00003620779500031
Wherein, table_name is table name, and can define table_name according to the difference of showing is different values; The row name of BH, BJ, JBNY, BZRJGH, BJLXM table, according to the difference of table, also can define row different value by name.
Comment on table XX_BJSJXX is' class data message ';
By this statement, be that table name adds remarks, these remarks are the title of table.
Comment on column XX_BJSJXX.BH is' class number, QUERY';
The BH field that is the XX_BJSJXX table by this statement is added remarks.Wherein " class number " is the title of field, the attribute that " QUERY " is field, and querying attributes, be illustrated in subsequent processes, and this field can be used as can inquire about field and be presented in the page.Here, the title of the attribute of field and field is by " comma " isolation.
Comment on column XX_BJSJXX.BJ is' class, QUERY';
The BJ field that is the XX_BJSJXX table by this statement is added remarks.The title that wherein " class " is field, the attribute that " QUERY " is field, be illustrated in subsequent processes, and this field can be used as can inquire about field and be presented in the page.Here, the title of the attribute of field and field is by " comma " isolation.
Comment on column XX_BJSJXX.JBNY is' builds class days, DATEYEAR';
The JBNY field that is the XX_BJSJXX table by this statement is added remarks.Wherein " class's of building days " are the title of field, the attribute that " DATEYEAR " is field, and the data type attribute, mean that this field is current follow-up, can present in the mode of date choice box.Here, the title of the attribute of field and field is by " comma " isolation.
The comment on column XX_BJSJXX.BZRJGH is' form master teach job number ';
The BZRJGH field that is the XX_BJSJXX table by this statement is added remarks.Wherein " form master teaches job number " is the title of this field.
Comment on column XX_BJSJXX.BJLXM is' class type codes, associated dictionary DM_HB_ZXXBJLX';
The BJLXM field that is the XX_BJSJXX table by this statement is added remarks.Wherein " class's type codes " is the title of field, and " associated dictionary DM_HB_ZXXBJLX " is the attribute of field, and the dictionary relating attribute, be illustrated in when down-stream is processed and understand associated dictionary table " DM_HB_ZXXBJLX ".Here, the title of the attribute of field and field is by " comma " isolation.
The above example of some remarks just, it will be understood by those skilled in the art that can also be self-defined other remarks mode, as long as down-stream has corresponding processing mode to each remarks.
In an embodiment of the present invention, the remarks to each field can be left in the remarks attribute of table, obtain by the USER_COL_COMMENTS field of inquiry view USER_TAB_COMMENTS.
Step 102: when the page is safeguarded, obtain specific field and corresponding remark information in table.
Illustrate, can take following statement to obtain field information in table:
SELECT?TABLE_NAME,COLUMN_NAME,COMMENTS?FROM?USER_COL_COMMENTS?WHERE?TABLE_NAME='XX_BJSJXX';
Still, with the data instance of step 101, the field now obtained and remark information can be as shown in the table:
Step 103: when adding the display page of this table, the name of field in the remarks of each Related fields is referred to as to fixed part and shows, and present the different forms that represents according to the attribute of field in remarks.
Still, with the data instance of step 101, Figure 2 shows that the example that this form finally presents.As shown in Figure 2, the first title of classifying field in the remarks of each Related fields as; Second classifies as according to the attribute of field in remarks and presents the different forms that represents.As be the date choice box after the days of graduating, after class's type codes, be drop-down list, wherein the value in drop-down list is the content in dictionary table.
In one example, attribute can also be shown as independent " information inquiry " part for the field of " QUERY ", as shown in Figure 3.When being retrieved, be input to the value in querying condition according to the user, dynamically splice query statement, inquire the information in table, then select to need the field derived, the information in table is presented to the user.
In the time need to being derived the information of database, the field name in remarks is presented to the user and select, the field name of selecting according to the user, the field attribute of analysis remarks, according to field attribute, derive the information in table.
In an embodiment of the present invention, when the table of needs maintenance is too much, before step 102, may further include:
Obtain the tables of data of partly or entirely obtaining;
Such as, can utilize following statement to obtain:
select*from?user_tab_comments;
This statement can be realized all tables with remark information are chosen, and for follow-up management person, is operated.
The embodiment of the present invention also further provides a kind of database maintenance device.This device comprises:
Remarks add module, for when building table, are recorded as table name and show the remark information that each field increases; Wherein, described remarks comprise the attribute of title and/or the field of field;
The data selection module, for when the page is safeguarded, obtain specific field and corresponding remark information in table;
Page display module, be referred to as fixed part for the name of the remarks field by each Related fields and show, and present the different forms that represents according to the attribute of field in remarks.
The database maintenance method and the device that utilize the embodiment of the present invention to provide, no matter in database, how many tables are arranged, no matter in maintenance process, database is carried out to what kind of additions and deletions and change operation, only utilize a set of maintenance program just can solve, realize that the mobilism of the page and data is processed.This mode effectively reduces code redundancy, has greatly improved development efficiency, has reduced maintenance cost.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement etc., within all should being included in protection scope of the present invention.

Claims (9)

1. a database maintenance method, is characterized in that, comprising:
While building table, be each field increase remarks of table name and table, and described remarks deposited in the remarks attribute of built table; Wherein, described remarks comprise the attribute of title and/or the field of field;
When the page is safeguarded, obtain specific field and corresponding remark information in table;
The name of field in the remarks of each Related fields is referred to as to fixed part and shows, and present the different forms that represents according to the attribute of field in remarks.
2. method according to claim 1, is characterized in that, in described remarks, the attribute of the title of described field and field isolated with " comma " or other symbols.
3. method according to claim 1, is characterized in that, the attribute of described field comprises querying attributes, data type attribute or dictionary relating attribute.
4. method according to claim 1, is characterized in that, the name of field in the remarks of each Related fields is referred to as to fixed part and shows, and present the different forms that represents according to the attribute of field in remarks and comprise:
Be current, first classifies the title of field in the remarks of each Related fields as; Second classifies as according to the attribute of field in remarks and presents the different forms that represents.
5. method according to claim 3, is characterized in that, the name of field in the remarks of each Related fields is referred to as to fixed part and shows, and present the different forms that represents according to the attribute of field in remarks and comprise:
When field attribute is the data type attribute, according to the data type of field attribute appointment, show input frame or date choice box;
When field attribute is the dictionary relating attribute, show drop-down list, the value in wherein said drop-down list is the content in dictionary table.
6. method according to claim 1, is characterized in that, further comprises: the field that will possess querying attributes is shown as independent " information inquiry " part;
Be input to the value in querying condition according to the user, dynamically splice query statement, inquire the information in table, then select to need the field derived, the information in table is presented to the user.
7. method according to claim 1, it is characterized in that, further comprise: when the information to database is derived, field name in remarks is presented to the user to be selected, the field name of selecting according to the user, analyze the field attribute of remarks, according to field attribute, the information in table is derived.
8. method according to claim 1, is characterized in that, in obtaining table, before the remark information of specific field and correspondence, further comprises:
Obtain the database table partly or entirely obtained.
9. a database maintenance device, is characterized in that, comprising:
Remarks add module, for when building table, are recorded as table name and show the remark information that each field increases, and described remarks are deposited in the remarks attribute of built table; Wherein, described remarks comprise the attribute of title and/or the field of field;
The data selection module, for when the page is safeguarded, obtain specific field and corresponding remark information in table;
Page display module, be referred to as fixed part for the name of the remarks field by each Related fields and show, and present the different forms that represents according to the attribute of field in remarks.
CN2013103379833A 2013-08-05 2013-08-05 Database maintenance method and device Pending CN103440272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103379833A CN103440272A (en) 2013-08-05 2013-08-05 Database maintenance method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103379833A CN103440272A (en) 2013-08-05 2013-08-05 Database maintenance method and device

Publications (1)

Publication Number Publication Date
CN103440272A true CN103440272A (en) 2013-12-11

Family

ID=49693964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103379833A Pending CN103440272A (en) 2013-08-05 2013-08-05 Database maintenance method and device

Country Status (1)

Country Link
CN (1) CN103440272A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021453A (en) * 2016-05-17 2016-10-12 中国建设银行股份有限公司 Data processing method and system
CN106407404A (en) * 2016-09-22 2017-02-15 成都快乐家网络技术有限公司 A data storage method, a data management method and system, a database and a client
CN108241499A (en) * 2018-01-05 2018-07-03 金行家(深圳)文化传播有限公司 Update method, device and the computer readable storage medium of field value annotation
CN111984670A (en) * 2020-07-27 2020-11-24 北京天健源达科技股份有限公司 Method for generating display view annotation information script
CN113835692A (en) * 2021-09-27 2021-12-24 湖南快乐阳光互动娱乐传媒有限公司 Dictionary data processing method and device, electronic equipment and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8096713B1 (en) * 2007-03-02 2012-01-17 Marvell International Ltd. Managing project information with a hand-propelled device
CN102346785A (en) * 2011-11-15 2012-02-08 北京创腾科技有限公司 Method and device for directly self-defining field of database
CN103020318A (en) * 2013-01-10 2013-04-03 北京锐安科技有限公司 Method for maintenance of database tables in database

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8096713B1 (en) * 2007-03-02 2012-01-17 Marvell International Ltd. Managing project information with a hand-propelled device
CN102346785A (en) * 2011-11-15 2012-02-08 北京创腾科技有限公司 Method and device for directly self-defining field of database
CN103020318A (en) * 2013-01-10 2013-04-03 北京锐安科技有限公司 Method for maintenance of database tables in database

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张绍林: "基于JavaEE5体现的联网售票系统设计与实现", 《中国优秀硕士学位论文全文数据库(信息科技辑)》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021453A (en) * 2016-05-17 2016-10-12 中国建设银行股份有限公司 Data processing method and system
CN106407404A (en) * 2016-09-22 2017-02-15 成都快乐家网络技术有限公司 A data storage method, a data management method and system, a database and a client
CN106407404B (en) * 2016-09-22 2019-09-24 成都快乐家网络技术有限公司 Date storage method, data managing method and system, database, client
CN108241499A (en) * 2018-01-05 2018-07-03 金行家(深圳)文化传播有限公司 Update method, device and the computer readable storage medium of field value annotation
CN111984670A (en) * 2020-07-27 2020-11-24 北京天健源达科技股份有限公司 Method for generating display view annotation information script
CN111984670B (en) * 2020-07-27 2024-03-19 北京天健源达科技股份有限公司 Method for generating script of annotation information of display view
CN113835692A (en) * 2021-09-27 2021-12-24 湖南快乐阳光互动娱乐传媒有限公司 Dictionary data processing method and device, electronic equipment and computer storage medium

Similar Documents

Publication Publication Date Title
US9460188B2 (en) Data warehouse compatibility
US10936556B2 (en) Generating a schema of a Not-only-Structured-Query-Language database
CN104298760B (en) A kind of data processing method and data processing equipment applied to data warehouse
WO2019148720A1 (en) Electronic device, data storage method and storage medium
US20150039651A1 (en) Templates for defining fields in machine data
CN104133772A (en) Automatic test data generation method
CN110472068A (en) Big data processing method, equipment and medium based on heterogeneous distributed knowledge mapping
CN103593456B (en) Worksheet self-defining method for designing and device
US20090024997A1 (en) Batch processing apparatus
CN103440272A (en) Database maintenance method and device
US11544443B2 (en) Time information coding method, coded value searching method, decoding method and device
CN105893337A (en) Method and equipment for text compression and decompression
CN111090417B (en) Binary file analysis method, binary file analysis device, binary file analysis equipment and binary file analysis medium
US20210056268A1 (en) Data transformation system and method
CN103714086A (en) Method and device used for generating non-relational data base module
US20150052157A1 (en) Data transfer content selection
CN109144964A (en) log analysis method and device based on machine learning
EP3388957A1 (en) Method and system for optimizing database system, electronic device, and storage medium
CN105930390A (en) Relation-type database expansion method and relation-type database expansion system
CN103077192A (en) Data processing method and system thereof
CN112000692B (en) Page query feedback method and device, computer equipment and readable storage medium
CN112988142A (en) Attribute table generation method and device
CN112380238A (en) Database data query method and device, electronic equipment and storage medium
EP4105813A1 (en) Method for analyzing data consisting of a large number of individual messages, computer program product and computer system
CN115329150A (en) Method and device for generating search condition tree, electronic equipment and storage medium

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 of invention or patent application
CB02 Change of applicant information

Address after: A large industrial building 30 No. 100083 Beijing Haidian District, Xueyuan Road Zhongguancun high-end entrepreneurial talent base A block 10 layer

Applicant after: Beijing Kang Bang Science and Technology Co., Ltd.

Address before: A large industrial building 30 No. 100083 Beijing Haidian District, Xueyuan Road Zhongguancun high-end entrepreneurial talent base A block 10 layer

Applicant before: Beijing Kangbang Science & Technology Co. Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING COMBANC TECHNOLOGY CO., LTD. TO: BEIJING KANGBANG TECHNOLOGY CO., LTD.

CB02 Change of applicant information

Address after: A large industrial building 30 No. 100083 Beijing Haidian District, Xueyuan Road Zhongguancun high-end entrepreneurial talent base A block 10 layer

Applicant after: Beijing Kangbang Science & Technology Co. Ltd.

Address before: A large industrial building 30 No. 100083 Beijing Haidian District, Xueyuan Road Zhongguancun high-end entrepreneurial talent base A block 10 layer

Applicant before: Beijing Kang Bang Science and Technology Co., Ltd.

COR Change of bibliographic data
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20131211