CN101645085B - Method and system for storing irregular fields - Google Patents

Method and system for storing irregular fields Download PDF

Info

Publication number
CN101645085B
CN101645085B CN200910090657A CN200910090657A CN101645085B CN 101645085 B CN101645085 B CN 101645085B CN 200910090657 A CN200910090657 A CN 200910090657A CN 200910090657 A CN200910090657 A CN 200910090657A CN 101645085 B CN101645085 B CN 101645085B
Authority
CN
China
Prior art keywords
field
classification
data
main body
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.)
Expired - Fee Related
Application number
CN200910090657A
Other languages
Chinese (zh)
Other versions
CN101645085A (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.)
Yonyou Network Technology Co Ltd
Original Assignee
Beijing Wecoo Electronic Business 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 Wecoo Electronic Business Technology Co Ltd filed Critical Beijing Wecoo Electronic Business Technology Co Ltd
Priority to CN200910090657A priority Critical patent/CN101645085B/en
Publication of CN101645085A publication Critical patent/CN101645085A/en
Application granted granted Critical
Publication of CN101645085B publication Critical patent/CN101645085B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method for storing irregular fields, which comprises the following steps: creating a main table, and storing basic fields based on the same classification in the main table, wherein classification type fields and classification data storage fields used for storing the information of self-owned fields are further stored in the main table; creating a classification table, and storing the classification information in the classification table, wherein the sequences of the information of the self-owned fields in the classification data storage fields in the main table are further stored in the classification table; and creating an attribute table, and storing the attributes of all the classified self-owned fields in the attribute table. The invention can not only avoid the problem of a large amount of redundant data caused by the data stored in a huge table, but also prevent a plurality of tables from being created, thereby avoiding the maintenance cost caused by a plurality of fragmentary table structures.

Description

Ragged array storage means and system
Technical field
The present invention relates to database technology, relate more specifically to ragged array storage means and system.
Background technology
In existing data structure, have a kind of irregular data structure following: most of elementary field of this data structure all is identical, but some distinguishing own fields are still arranged between its different classification.Be the data of retail shop equally, they have total information field such as title, address, telephone number.Yet, exist distinguishing separately information field between different industries and the classification again, similarly be that parlor quantity, specialties are arranged in the catering industry; In the time of vehicle borne, each car all has restriction of its tonnage that can carry or the like.Have is exactly that these own fields have uncertainty again; Because each industry all can have its newly-increased own field; All be to use cash in the time of for example former paying, and use credit card present people, whether the standby credit card is consumed field so will increase.
Existing database design is in this irregular data of storage; Dual mode is generally arranged: a kind of mode is to use a super big table; Will comprise all total fields and own field in this table, but this mode has been accomplished functional requirement has but been write down the invalid data of bulk redundancy; A kind of is that the same section of corresponding data is wanted a table, the table of corresponding again its special construction of reflection of own fields of each different classification.So in this case, in database table, will there be a large amount of tables to describe the corresponding own field of different classification.Just therefore caused huge form quantity, increased under the situation that changes own field at needs and caused no small maintenance costs, and in search data, also can bring very big inquiry expense.
Solve the huge maintenance costs that the storage anomaly number is redundant according to the mass data that causes and list structure is brought, just need novel ragged array storage means and system.
Summary of the invention
In order one of to address the above problem; The invention provides the ragged array storage means; Comprise: set up the main body table, the identical elementary field of classification is stored in the said main body table, wherein; Said main body table also stores classification type field and grouped data storage field, and said grouped data storage field is used to store own field information; Set up sorted table, classified information is stored in the said sorted table, said sorted table also stores own field information order in the grouped data storage field in the main body table; Set up attribute list, with the property store of all own fields of all classification in said attribute list.
In fact said classified information is meant that this classification all stores the enantiomorphic relationship of which own field and these residing positions of own field.Illustrate: be " 1|2|3 " if classification number is 10000 the information content, be exactly so mean the real data of storing in the main body table for " content of 1 own data field 02 own field content 03 the content (wherein 0 be the decollator of hiding) of own field ".
What said attribute list write down is the id (both numbering) of all own fields and title and other the relevant attributes that should have field by oneself of this numbering corresponding field.Numeral 1,2,3 among " 1|2|3 " that preserves in the classified information in sorted table is exactly the own field id numbering in the attribute list.
In said method, preferably, use sightless control character separated for example: " 0 " each own field information is broken off.
In said method; Preferably, further comprise: use text to set up the mirror between the data in each own field and the database, when upgrading said own field; Upgrade said mirror, and record is through the unique identifier of the said own field of modification.Each own field is wanted corresponding text; Text file wants content recorded to comprise that these data are recorded in the unique sign in the database, the content of the classification number that notebook data belongs to and the own field of this data preservation (if the content that should have field by oneself that these data are preserved is sky then this record do not occur).
In said method, preferably, further comprise: carry out the renewal of database data through database script.
In said method; Preferably, the renewal of carrying out database data through the modification script is specially: the text under the use line, revise said ragged array; Generate batch data updated storehouse script, carry out the renewal that said batch of data updated storehouse script accomplished database data.
The generation method of database script is following: the unique identification that will make the data of revising travels through in the pairing own field file of classification, and these data according to the sorted table descriptor format, are synthesized all own field groups the renewal statement of a database.Write into text to updating data statement in all at last and form the updating data script.In the time of the own field of Data Update, actual modification be the content of text ghost record, and note the unique identification of making the data of revising subsequent use.
The present invention also provides a kind of ragged array storage system; Comprise: main body table apparatus for establishing; Be used to set up the main body table, the identical elementary field of classification is stored in the said main body table, wherein; Said main body table also stores classification type field and grouped data storage field, and said grouped data storage field is used to store all own field informations of this classification; The sorted table apparatus for establishing is used to set up sorted table, and classified information is stored in the said sorted table, and said sorted table also stores own field order in the grouped data storage field in the main body table of this classification; The attribute list apparatus for establishing is used to set up attribute list, with the property store of all own fields of all classification in said attribute list.
In fact said classified information is meant that this classification all stores the enantiomorphic relationship of which own field and these residing positions of own field.Illustrate: be " 1|2|3 " if classification number is 10000 the information content, be exactly so mean the real data of storing in the main body table for " content of 1 own data field 02 own field content 03 the content (wherein 0 be the decollator of hiding) of own field ".
What said attribute list write down is the id (both numbering) of all own fields and title and other the relevant attributes that should have field by oneself of this numbering corresponding field.Numeral 1,2,3 among " 1|2|3 " that preserves in the classified information in sorted table is exactly the own field id numbering in the attribute list.
In said system, preferably, use sightless control character at a distance from each own field information is broken off.
In said system; Preferably; Further comprise the mirror apparatus for establishing, the mirror between the data that are used for using text to set up each own field and database is when upgrading said own field; Upgrade said mirror, and record is through the unique identifier of the said own field of modification.
In said system, preferably, further comprise updating device, be used for carrying out the renewal of database data through database script.
In said system, preferably, said updating device uses the text under the line, revises said ragged array, generates batch data updated storehouse script, carries out the renewal that said batch of data updated storehouse script accomplished database data.
Through technique scheme, both avoided using a super big table to store the mass of redundancy data problem that data are brought, can not produce many tables again, the maintenance costs of just therefore having avoided many scrappy list structures to bring.
Description of drawings
Fig. 1 shows the process flow diagram according to ragged array storage means of the present invention; And
Fig. 2 shows the block diagram according to ragged array storage system of the present invention.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is done further detailed explanation.
Fig. 1 shows the process flow diagram according to ragged array storage means of the present invention.
This method comprises: step 102; Set up the main body table, the identical elementary field of classification is stored in the said main body table, wherein; Said main body table also stores classification type field and grouped data storage field, and said grouped data storage field is used to store own field information; Step 104 is set up sorted table, and classified information is stored in the said sorted table, and said sorted table also stores own field information order in the grouped data storage field in the main body table; Step 106 is set up attribute list, with the property store of all own fields of all classification in said attribute list.
In fact said classified information is meant that this classification all stores the enantiomorphic relationship of which own field and these residing positions of own field.Illustrate: be " 1|2|3 " if classification number is 10000 the information content, be exactly so mean the real data of storing in the main body table for " content of 1 own data field 02 own field content 03 the content (wherein 0 be the decollator of hiding) of own field ".
What said attribute list write down is the id (both numbering) of all own fields and title and other the relevant attributes that should have field by oneself of this numbering corresponding field.Numeral 1,2,3 among " 1|2|3 " that preserves in the classified information in sorted table is exactly the own field id numbering in the attribute list.
In said method, preferably, use sightless control character at a distance from each own field information is broken off.
In said method; Preferably, further comprise: use text to set up the mirror between the data in each own field and the database, when upgrading said own field; Upgrade said mirror, and record is through the unique identifier of the said own field of modification.Each own field is wanted corresponding text; Text file wants content recorded to comprise that these data are recorded in the unique sign in the database, the content of the classification number that notebook data belongs to and the own field of this data preservation (if the content that should have field by oneself that these data are preserved is sky then this record do not occur).
In said method, preferably, further comprise: carry out the renewal of database data through database script.
In said method; Preferably, the renewal of carrying out database data through the modification script is specially: the text under the use line, revise said ragged array; Generate batch data updated storehouse script, carry out the renewal that said batch of data updated storehouse script accomplished database data.
The generation method of database script is following: the unique identification that will make the data of revising travels through in the pairing own field file of classification, and these data according to the sorted table descriptor format, are synthesized all own field groups the renewal statement of a database.Write into text to updating data statement in all at last and form the updating data script.In the time of the own field of Data Update, actual modification be the content of text ghost record, and note the unique identification of making the data of revising subsequent use.
Through an instance said method is described below.
The identical elementary field of each classification is concentrated in the main body table, in this main body table, will add classification type field and grouped data storage field in addition.To write down the information of all own fields of this classification in the grouped data storage field, between each own field information, break off at a distance from " " with sightless control character.As shown in table 1.
The id of businessman Classification id Elementary field Own field
100 yuan 0 support to use credit card 0 have parlor 07:00-18:00
……
Table 1
Classification of Data information will be combined with a sorted table (referring to table 2), and this table also will write down the order of own field grouped data storage field the inside in the main body table of this classification except the information of wanting the minute book classification.
Classification id Specific name Own order of the field
1|2|6|15
2|3|4
……
Table 2
Also need attribute lists (referring to table 3) write down all own fields of all classification in addition, in the own order of the field of sorted table the inside record, just can use this table ID number.
Own field id Own field title
1 The pre-capita consumption volume
2 Whether credit card is used in support
…… ……
6 Whether parlor is arranged
…… ……
15 Business hours
Table 3
Beyond database, need to use text do a ghost record to the data of each own field, the critical field that this own field corresponding informance will be preserved in this record (referring to table 4) the inside can let the data in it and the database connect.
The id of businessman Classification id Own field data content
100 yuan
72 yuan
……
Table 4
When Foreground Data was showed at ordinary times, the relation of each table through database can be stored data in the field with grouped data and split into the form that needs and be presented at front page layout.Only need in attribute list, look into corresponding own field by interpolation when making an amendment to own field, the data of revising sorted table then just can have been accomplished the modification of whole data model.When Updating Information, just can use the text under the line; The data processing that will handle with revise; At last amended data are reconsolidated and form a batch of data updated storehouse script, carry out the renewal that this script has just been accomplished database data later on.
Fig. 2 shows the block diagram according to ragged array storage system of the present invention.
This ragged array storage system 200 comprises: main body table apparatus for establishing 202; Be used to set up the main body table; The identical elementary field of classification is stored in the said main body table; Wherein, said main body table also stores classification type field and grouped data storage field, and said grouped data storage field is used to store own field information; Sorted table apparatus for establishing 204 is used to set up sorted table, and classified information is stored in the said sorted table, and said sorted table also stores own field information order in the grouped data storage field in the main body table; Attribute list apparatus for establishing 206 is used to set up attribute list, with the property store of all own fields of all classification in said attribute list.
In fact said classified information is meant that this classification all stores the enantiomorphic relationship of which own field and these residing positions of own field.Illustrate: be " 1|2|3 " if classification number is 10000 the information content, be exactly so mean the real data of storing in the main body table for " content of 1 own data field 02 own field content 03 the content (wherein 0 be the decollator of hiding) of own field ".
What said attribute list write down is the id (both numbering) of all own fields and title and other the relevant attributes that should have field by oneself of this numbering corresponding field.Numeral 1,2,3 among " 1|2|3 " that preserves in the classified information in sorted table is exactly the own field id numbering in the attribute list.
In said system, preferably, use sightless control character at a distance from each own field information is broken off.
In said system, preferably, further comprise mirror apparatus for establishing 208, the mirror between the data that are used for using text to set up each own field and database.Each own field is wanted corresponding text; Text file wants content recorded to comprise that these data are recorded in the unique sign in the database, the content of the classification number that notebook data belongs to and the own field of this data preservation (if the content that should have field by oneself that these data are preserved is sky then this record do not occur).
In said system, preferably, further comprise updating device 210, be used for carrying out the renewal of database data through database script.
In said system, preferably, said updating device uses the text under the line, revises said ragged array, generates batch data updated storehouse script, carries out the renewal that said batch of data updated storehouse script accomplished database data.
The generation method of database script is following: the unique identification that will make the data of revising travels through in the pairing own field file of classification, and these data according to the sorted table descriptor format, are synthesized all own field groups the renewal statement of a database.Write into text to updating data statement in all at last and form the updating data script.In the time of the own field of Data Update, actual modification be the content of text ghost record, and note the unique identification of making the data of revising subsequent use.
Through technique scheme, both avoided using a super big table to store the mass of redundancy data problem that data are brought, can not produce many tables again, the maintenance costs of just therefore having avoided many scrappy list structures to bring.
Certain system is arranged, have a plurality of classification such as food and drink, supermarket, tourist attractions and government bodies simultaneously.Public field has: title, address, telephone number classification number; The characteristic dish of own field and the pre-capita consumption volume of food and drink classification, the own field in supermarket has business hours, item quantity and parking space number, and there are ticket price and parking space number in tourist attractions, and there is the office hours in government bodies, or the like.
Use is based on technical scheme of the present invention, no matter will use what classification in the system, we only need to use 3 tables just can describe whole data formats.In data query; Only need inquiry main body table just can obtain corresponding total data content and not have redundant data; In newly-increased whether standby credit card field, the data of the inside, storehouse that only need Update Information, and the structure of original table does not need to revise.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. a ragged array storage means is characterized in that, comprising:
Set up the main body table; Identical elementary field in each classification is stored in the said main body table; Wherein, Said main body table also stores classification type field and grouped data storage field, and said classification type field is used to store the sign of each classification, and said grouped data storage field is used for storing a plurality of own field information of each classification;
Set up sorted table, the classified information of each classification is stored in the said sorted table, said sorted table also stores said own field information order in the grouped data storage field in the main body table;
Set up attribute list, with the property store of all own fields of all classification in said attribute list.
2. ragged array storage means according to claim 1 is characterized in that, uses sightless control character that each own field information is broken off.
3. ragged array storage means according to claim 1 and 2; It is characterized in that; Further comprise: use text to preserve the ghost record of the data of each own field in database; When upgrading said own field information, upgrade said ghost record, and record is through the unique identifier of the said own field revised.
4. ragged array storage means according to claim 1 and 2 is characterized in that, further comprises: carry out the renewal of database data through database script.
5. a ragged array storage system is characterized in that, comprising:
Main body table apparatus for establishing; Be used to set up the main body table; Identical elementary field in each classification is stored in the said main body table, and wherein, said main body table also stores classification type field and grouped data storage field; Said classification type field is used to store the sign of each classification, and said grouped data storage field is used for storing a plurality of own field information of each classification;
The sorted table apparatus for establishing is used to set up sorted table, and the classified information of each classification is stored in the said sorted table, and said sorted table also stores said own field information order in the grouped data storage field in the main body table;
The attribute list apparatus for establishing is used to set up attribute list, with the property store of all own fields of all classification in said attribute list.
6. ragged array storage system according to claim 5 is characterized in that, uses sightless control character that each own field information is broken off.
7. according to claim 5 or 6 described ragged array storage systems; It is characterized in that; Further comprise the ghost record save set, be used for using text to preserve the ghost record of each own field, when upgrading said own field information in the data of database; Upgrade said ghost record, and record is through the unique identifier of the said own field of modification.
8. according to claim 5 or 6 described ragged array storage systems, it is characterized in that, further comprise updating device, be used for carrying out the renewal of database data through database script.
CN200910090657A 2009-09-03 2009-09-03 Method and system for storing irregular fields Expired - Fee Related CN101645085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910090657A CN101645085B (en) 2009-09-03 2009-09-03 Method and system for storing irregular fields

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910090657A CN101645085B (en) 2009-09-03 2009-09-03 Method and system for storing irregular fields

Publications (2)

Publication Number Publication Date
CN101645085A CN101645085A (en) 2010-02-10
CN101645085B true CN101645085B (en) 2012-09-12

Family

ID=41656973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910090657A Expired - Fee Related CN101645085B (en) 2009-09-03 2009-09-03 Method and system for storing irregular fields

Country Status (1)

Country Link
CN (1) CN101645085B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523580A (en) * 2011-11-25 2012-06-27 北京握奇数据系统有限公司 M2M (Machine-to-Machine/Man) service terminal data processing method and M2M service card as well as M2M terminal data processing card
CN103049567A (en) * 2012-12-31 2013-04-17 威盛电子股份有限公司 Retrieval method, retrieval system and natural language understanding system
CN106547786A (en) * 2015-09-22 2017-03-29 阿里巴巴集团控股有限公司 A kind of date storage method and device
CN111177179B (en) * 2019-12-06 2023-11-10 北京懿医云科技有限公司 Information recording method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6061690A (en) * 1997-10-31 2000-05-09 Oracle Corporation Apparatus and method for storage of object collections in a database system
CN1270363A (en) * 1999-04-09 2000-10-18 英业达股份有限公司 Database management method
CN101464885A (en) * 2008-12-31 2009-06-24 金蝶软件(中国)有限公司 Method and apparatus for exhibiting product attribute information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6061690A (en) * 1997-10-31 2000-05-09 Oracle Corporation Apparatus and method for storage of object collections in a database system
CN1270363A (en) * 1999-04-09 2000-10-18 英业达股份有限公司 Database management method
CN101464885A (en) * 2008-12-31 2009-06-24 金蝶软件(中国)有限公司 Method and apparatus for exhibiting product attribute information

Also Published As

Publication number Publication date
CN101645085A (en) 2010-02-10

Similar Documents

Publication Publication Date Title
Cohen A consumers' republic: The politics of mass consumption in postwar America
CN102253936B (en) Method for recording access of user to merchandise information, search method and server
CN109190044A (en) Personalized recommendation method, device, server and medium
CN101506767B (en) Relative to taxonomic hierarchies classify such as document and/or cluster object and from this classification derive data structure
CN101645085B (en) Method and system for storing irregular fields
CN105205749A (en) JSP-based house property sale system
CN107292365A (en) Binding method, device, equipment and the computer-readable recording medium of Commercial goods labelses
CN104142940A (en) Information recommendation processing method and information recommendation processing device
CN103200293A (en) Method of automatically combining tautonomy contacts in process of guiding contacts into contact list
CN106599153A (en) Multi-data-source-based waste industry search system and method
CN102779311A (en) Method and system based on area and aging control and used for pushing information
CN108021627A (en) The storage method and device of associated data
US20130184016A1 (en) Method to send a short message service (sms) campaign to a related object by selecting the base object
JP2018026133A (en) Information providing system and information providing method utilizing physical medium
Davis et al. The digital advantage
CN101702216A (en) Method for supporting configuration of various stock services
Beaulieu et al. Presidential marketing: Trade promotion effects of state visits
CN105760512A (en) Commercial logic classifying method of virtual map
CN104978169A (en) SDK processing method and SDK processing device for periodical reading application
CN101916248A (en) Method for translating internet webpage
CN101706910A (en) Configuration method supporting inventory transaction and accounting rules
CN104318375A (en) Small supermarket commodity information management system
CN107239962B (en) Method and system for matching multi-dimensional data units in electronic information system
CN107358565A (en) library management method based on RFID
CN104714945A (en) Commodity information system establishing method and system

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
CB02 Change of applicant information

Address after: 100094 Beijing city Haidian District North Road No. 68, UFIDA Software Park

Applicant after: Beijing Wecoo Electronic Business Technology Co., Ltd.

Address before: 100094 Beijing city Haidian District North Road No. 68, UFIDA Software Park

Applicant before: Beijing UFIDA Mobile Business Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING YONGYOU MOBILE BUSINESS TECHNOLOGY CO., LTD. TO: BEIJING WEIKU ELECTRONIC COMMERCE TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: UFIDA SOFTWARE CO., LTD.

Free format text: FORMER NAME: BEIJING WEIKU ELECTRONIC COMMERCE TECHNOLOGY CO., LTD.

CP03 Change of name, title or address

Address after: 100094 Haidian District North Road, Beijing, No. 68

Patentee after: UFIDA Software Co., Ltd.

Address before: 100094 Beijing city Haidian District North Road No. 68, UFIDA Software Park

Patentee before: Beijing Wecoo Electronic Business Technology Co., Ltd.

C56 Change in the name or address of the patentee

Owner name: YONYOU NETWORK TECHNOLOGY CO., LTD.

Free format text: FORMER NAME: UFIDA SOFTWARE CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 100094 Haidian District North Road, Beijing, No. 68

Patentee after: Yonyou Network Technology Co., Ltd.

Address before: 100094 Haidian District North Road, Beijing, No. 68

Patentee before: UFIDA Software Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120912

Termination date: 20180903