CN102682108A - Row and line mixed database storage method - Google Patents

Row and line mixed database storage method Download PDF

Info

Publication number
CN102682108A
CN102682108A CN2012101394887A CN201210139488A CN102682108A CN 102682108 A CN102682108 A CN 102682108A CN 2012101394887 A CN2012101394887 A CN 2012101394887A CN 201210139488 A CN201210139488 A CN 201210139488A CN 102682108 A CN102682108 A CN 102682108A
Authority
CN
China
Prior art keywords
row
record
physical memory
database storing
mix
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.)
Granted
Application number
CN2012101394887A
Other languages
Chinese (zh)
Other versions
CN102682108B (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.)
SHANXI TONGFANG ZHIWANG DIGITAL PUBLISHING TECHNOLOGY CO., LTD.
Original Assignee
TONGFANG OPTICAL DISC 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 TONGFANG OPTICAL DISC Co Ltd filed Critical TONGFANG OPTICAL DISC Co Ltd
Priority to CN201210139488.7A priority Critical patent/CN102682108B/en
Publication of CN102682108A publication Critical patent/CN102682108A/en
Application granted granted Critical
Publication of CN102682108B publication Critical patent/CN102682108B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a row and line mixed database storage method, which comprises the steps of: creating a table and physical storage spaces corresponding to the table, and determining the corresponding relationship between lines and the physical storage spaces according to application requirements; inserting records into the table, and grouping according to the corresponding relationship between the lines and the physical storage spaces; and writing recorded line values as rows into the corresponding physical storage spaces. By means of the row and line mixed database storage method provided by the invention, whole-table inquiry is avoided effectively, I/O (Input/Output) expenditure is reduced, and the speed of data reading and the inquiry performance of a full-text database are increased.

Description

The database storing method that a kind of ranks mix
Technical field
The present invention relates to a kind of data database storing technology, the ranks that relate in particular to a kind of application oriented storage magnanimity unstructured data object mix storage means.
Background technology
At present, the data of data base management system (DBMS) management appear with the bivariate table form of row, row, row corresponding record, row corresponding the field of record.
Traditional line data storehouse, is written to the data value of delegation in internal memory or the hard disk as an one dimension character string during data in storage, therefore if inquire about certain field value of certain bar record, then need read the whole piece record.But for the inquiry intensive applications, a part of field value of record is often only used in the great majority inquiry.Adopt the row memory technology, can cause system on the reading and store of data, to have following weak point, on performance, can't satisfy demands of applications.
At first, though only use a part of field of record, the existing capable memory technology system that makes must all read the whole piece record in the buffer memory; So not only cause data reading speed to reduce; The I/O expense is excessive, and loads unwanted field and also wasted valuable spatial cache, reduces cache hit rate; Make the follow-up data processing delay, the performance of system is affected.
Secondly, the field of record can be divided into inquiry field commonly used and non-common field, if non-common field is placed on the cheap apparatus, can reduce carrying cost.But existing capable memory technology characteristics have determined that the field commonly used and the field that is of little use are to store continuously, have taken same storage resources on disk.This is unfavorable for the reasonable distribution of resource apparatus.
Row formula database appear at the above deficiency that has remedied the line data storehouse to a certain extent.Its feature is that record is stored by row.But this also causes it when inquiry is used, to exist some problems.For example, if the inquiry demands of applications is to inquire about calculating according to the value of a certain row, obtain the degree of correlation the highest before some record numbers, and return the value of some specify columns (field) of these some records.Row formula database is when this demand of realization; Because record is by the row storage; So according to after the inquiry of the value of certain row and obtaining the relative recording numbering, the value of other specify columns that can not obtain immediately writing down, but also need search these specify columns earlier; And then from these specify columns, search record, read out the respective value of record.This search procedure has reduced the performance of inquiry.
Summary of the invention
For solving above-mentioned middle problem and the defective that exists, the invention provides a kind of database storing method of ranks mixing of application oriented storage magnanimity unstructured data object.Said technical scheme is following:
The database storing method that a kind of ranks mix comprises:
Create table and table corresponding physical memory space, establish the corresponding relation of row and amount of physical memory based on application demand;
In table, insert record, and divide into groups by the corresponding relation of row and amount of physical memory;
The train value of record is written in the corresponding physical storage space as row.
The beneficial effect of technical scheme provided by the invention is:
Mix storage means through ranks provided by the invention and avoided full table inquiry effectively, reduced the I/O expense, improved the speed that data read and the query performance of full-text database.
Description of drawings
Fig. 1 is the database storing method flow diagram that ranks mix;
Fig. 2 is the storage architecture design drawing of table.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, embodiment of the present invention is done to describe in detail further below in conjunction with accompanying drawing:
The database storing method that present embodiment provides a kind of ranks to mix, wherein,
Referring to Fig. 1, this method may further comprise the steps:
Step 10 is created table and table corresponding physical storage space, establishes the corresponding relation of row and storage space according to application demand;
Step 20 is inserted record in table, and divides into groups by the corresponding relation of row and amount of physical memory;
Step 30 is written to the train value of record in the corresponding physical storage space as row.
Above-mentioned steps 10 establishment tables comprise the required amount of physical memory of title, field and allocation table of establishment table, establish the corresponding relation of row and amount of physical memory, and above-mentioned row are field.In the present embodiment, each shows all corresponding one or more amount of physical memory (as shown in Figure 2), if do not do special appointment during the establishment table, system will distribute the amount of physical memory of an acquiescence automatically.After creating table, also can assess requisite space according to the dynamic change of data, new storage space is created in application.For the field in the table, when the establishment table, can specify it to be stored in which amount of physical memory, row (field) that like this can frequency of utilization is higher are stored in same storage space continuously, to improve the efficient that data read.
In the above-mentioned steps 20, when in table, inserting record,, and will write down by row (field) cutting for a unique identification number in this table created in record; According to the mapping table of field and amount of physical memory, train value (field value) is divided into groups, the train value (field value) of the row of corresponding same amount of physical memory is divided into same group, and each group can be regarded as a row vector.
Above-mentioned steps 30 as a row vector (an one dimension character string), is written to the corresponding physical storage space with the train value group after dividing into groups through the train value (field value) with record.Owing to store in order by record identify number during the data in the amount of physical memory, therefore insert the particular location of row vector and also confirm according to the size of record identify number.If should the correspondence amount of physical memory full, can't carry out insertion, then application is opened up a new amount of physical memory storing, and the mapping table of newer field and storage space more.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (5)

1. the ranks database storing method of mixing is characterized in that said method comprises:
Create table and table corresponding physical memory space, establish the corresponding relation of row and amount of physical memory based on application demand;
In table, insert record, and divide into groups by the corresponding relation of row and amount of physical memory;
The train value of record is written in the corresponding physical storage space as row.
2. the database storing method that ranks according to claim 1 mix is characterized in that the table of said establishment comprises the title and the literary name section of table.
3. the database storing method that ranks according to claim 1 mix is characterized in that, corresponding at least one amount of physical memory of said table.
4. the database storing method that ranks according to claim 1 mix is characterized in that, when in table, inserting record, for a unique identification number in this table created in record, and will write down and press the row cutting; Mapping table according to row and storage space divides into groups train value.
5. the database storing method that ranks according to claim 4 mix is characterized in that the train value of the row of corresponding same storage space is divided into same group.
CN201210139488.7A 2012-05-08 2012-05-08 Row and line mixed database storage method Active CN102682108B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210139488.7A CN102682108B (en) 2012-05-08 2012-05-08 Row and line mixed database storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210139488.7A CN102682108B (en) 2012-05-08 2012-05-08 Row and line mixed database storage method

Publications (2)

Publication Number Publication Date
CN102682108A true CN102682108A (en) 2012-09-19
CN102682108B CN102682108B (en) 2015-02-18

Family

ID=46814033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210139488.7A Active CN102682108B (en) 2012-05-08 2012-05-08 Row and line mixed database storage method

Country Status (1)

Country Link
CN (1) CN102682108B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440245A (en) * 2013-07-15 2013-12-11 西北工业大学 Line and column hybrid storage method of database system
CN103678556A (en) * 2013-12-06 2014-03-26 华为技术有限公司 Method for processing column-oriented database and processing equipment
CN104424287A (en) * 2013-08-30 2015-03-18 深圳市腾讯计算机系统有限公司 Query method and query device for data
CN104516912A (en) * 2013-09-29 2015-04-15 中国移动通信集团黑龙江有限公司 Dynamic data storage method and device
CN104572893A (en) * 2014-12-24 2015-04-29 天津南大通用数据技术股份有限公司 Hybrid storage method for data in database
CN104750809A (en) * 2015-03-26 2015-07-01 中国科学院软件研究所 Storage method for supporting relation model and blended data of key-value structure
WO2015117280A1 (en) * 2014-02-10 2015-08-13 华为技术有限公司 Data processing method, data writing method, and related apparatus
WO2017161540A1 (en) * 2016-03-24 2017-09-28 华为技术有限公司 Data query method, data object storage method and data system
CN109542898A (en) * 2018-10-30 2019-03-29 天津字节跳动科技有限公司 Date storage method, device, electronic equipment and the storage medium of data bank table
CN110019014A (en) * 2017-12-19 2019-07-16 华为技术有限公司 To the method and apparatus of file system write-in data record

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6606638B1 (en) * 1998-07-08 2003-08-12 Required Technologies, Inc. Value-instance-connectivity computer-implemented database
CN101751406A (en) * 2008-12-18 2010-06-23 赵伟 Method and device for realizing column storage based relational database
CN102129458A (en) * 2011-03-09 2011-07-20 胡劲松 Method and device for storing relational database

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6606638B1 (en) * 1998-07-08 2003-08-12 Required Technologies, Inc. Value-instance-connectivity computer-implemented database
CN101751406A (en) * 2008-12-18 2010-06-23 赵伟 Method and device for realizing column storage based relational database
CN102129458A (en) * 2011-03-09 2011-07-20 胡劲松 Method and device for storing relational database

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440245A (en) * 2013-07-15 2013-12-11 西北工业大学 Line and column hybrid storage method of database system
CN104424287A (en) * 2013-08-30 2015-03-18 深圳市腾讯计算机系统有限公司 Query method and query device for data
CN104424287B (en) * 2013-08-30 2019-06-07 深圳市腾讯计算机系统有限公司 Data query method and apparatus
CN104516912A (en) * 2013-09-29 2015-04-15 中国移动通信集团黑龙江有限公司 Dynamic data storage method and device
CN104516912B (en) * 2013-09-29 2018-06-26 中国移动通信集团黑龙江有限公司 A kind of dynamic date storage method and device
CN103678556A (en) * 2013-12-06 2014-03-26 华为技术有限公司 Method for processing column-oriented database and processing equipment
WO2015081780A1 (en) * 2013-12-06 2015-06-11 华为技术有限公司 Columnar database processing method and processing device
US10303691B2 (en) 2013-12-06 2019-05-28 Huawei Technologies Co., Ltd. Column-oriented database processing method and processing device
US9710504B2 (en) 2014-02-10 2017-07-18 Huawei Technologies Co., Ltd. Data processing and writing method and related apparatus
WO2015117280A1 (en) * 2014-02-10 2015-08-13 华为技术有限公司 Data processing method, data writing method, and related apparatus
CN104572893B (en) * 2014-12-24 2018-02-27 天津南大通用数据技术股份有限公司 A kind of data mixing storage method in database
CN104572893A (en) * 2014-12-24 2015-04-29 天津南大通用数据技术股份有限公司 Hybrid storage method for data in database
CN104750809B (en) * 2015-03-26 2018-05-18 中国科学院软件研究所 A kind of blended data storage method for supporting relational model and key-value structure
CN104750809A (en) * 2015-03-26 2015-07-01 中国科学院软件研究所 Storage method for supporting relation model and blended data of key-value structure
WO2017161540A1 (en) * 2016-03-24 2017-09-28 华为技术有限公司 Data query method, data object storage method and data system
CN110019014A (en) * 2017-12-19 2019-07-16 华为技术有限公司 To the method and apparatus of file system write-in data record
CN109542898A (en) * 2018-10-30 2019-03-29 天津字节跳动科技有限公司 Date storage method, device, electronic equipment and the storage medium of data bank table

Also Published As

Publication number Publication date
CN102682108B (en) 2015-02-18

Similar Documents

Publication Publication Date Title
CN102682108B (en) Row and line mixed database storage method
CN102129458B (en) Method and device for storing relational database
CN102867071B (en) Management method for massive network management historical data
CN107391544B (en) Processing method, device and equipment of column type storage data and computer storage medium
CN102509012A (en) Method for mapping contents of electronic medical record into electronic medical record standard database
CN105117417A (en) Read-optimized memory database Trie tree index method
TW201530328A (en) Method and device for constructing NoSQL database index for semi-structured data
CN102622434B (en) Data storage method, data searching method and device
CN104112008A (en) Multi-table data association inquiry optimizing method and device
CN103440245A (en) Line and column hybrid storage method of database system
CN103942159A (en) Data read-write method and device based on mixed storage device
CN102158349A (en) Log management device and method thereof
CN103838853A (en) Mixed file system based on different storage media
CN104281717B (en) A kind of method for setting up magnanimity ID mapping relations
CN102521419A (en) Hierarchical storage realization method and system
CN103914483A (en) File storage method and device and file reading method and device
CN102779138A (en) Hard disk access method of real time data
CN104424240A (en) Multi-table correlation method and system, main service node and computing node
CN105912270B (en) A kind of access request resolver and method towards PM
CN102521304A (en) Hash based clustered table storage method
CN104714898B (en) A kind of distribution method and device of Cache
CN101408882A (en) Method and system for searching authorisation document
CN110442571A (en) A kind of data processing method, device and computer storage medium
CN102768672A (en) Disk space management method and device
CN109213751B (en) Spark platform based Oracle database parallel migration method

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: 100084 Beijing city Haidian District Huaye building of Tsinghua University

Applicant after: TONGFANG KNOWLEDGE NETWORK DIGITAL PUBLICATION TECHNOLOGY CO., LTD.

Address before: 100084 Beijing city Haidian District Tsinghua University Tsinghua Yuan 36 zone B1410, Huaye building 1412, room 1414

Applicant before: Tongfang Optical Disc Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: TONGFANG OPTICAL DISC CO., LTD. TO: TONGFANG ZHIWANG DIGITAL PUBLISHING TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20150928

Address after: 030006 Shanxi city of Taiyuan province high tech Zone Industrial Road No. 48 new island D garden of science and technology

Patentee after: SHANXI TONGFANG ZHIWANG DIGITAL PUBLISHING TECHNOLOGY CO., LTD.

Address before: 100084 Beijing city Haidian District Huaye building of Tsinghua University

Patentee before: TONGFANG KNOWLEDGE NETWORK DIGITAL PUBLICATION TECHNOLOGY CO., LTD.