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

Row and line mixed database storage method Download PDF

Info

Publication number
CN102682108B
CN102682108B CN201210139488.7A CN201210139488A CN102682108B CN 102682108 B CN102682108 B CN 102682108B CN 201210139488 A CN201210139488 A CN 201210139488A CN 102682108 B CN102682108 B CN 102682108B
Authority
CN
China
Prior art keywords
row
amount
physical memory
record
field
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.)
Active
Application number
CN201210139488.7A
Other languages
Chinese (zh)
Other versions
CN102682108A (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 KNOWLEDGE NETWORK DIGITAL PUBLICATION 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 TONGFANG KNOWLEDGE NETWORK DIGITAL PUBLICATION TECHNOLOGY Co Ltd filed Critical TONGFANG KNOWLEDGE NETWORK DIGITAL PUBLICATION TECHNOLOGY 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

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

A kind of database storage method of ranks mixing
Technical field
The present invention relates to a kind of data database storing technology, particularly relate to a kind of ranks mixing storage means of application oriented storage magnanimity unstructured data object.
Background technology
At present, the data of data base management system (DBMS) management present with the bivariate table form of row, column, and row correspond to record, and row correspond to the field of record.
Traditional line data storehouse, when storing data, is written to the data value of a line in internal memory or hard disk as an one dimension character string, if therefore will inquire about certain field value of certain record, then needs to read whole piece record.But for inquiry intensive applications, a part of field value of record is often only used in great majority inquiry.Adopt row memory technology, system can be caused in the reading of data and storage to there is following weak point, performance cannot meet the demand of application.
First, although only use a part of field of record, but existing row memory technology makes system whole piece record all must be read in buffer memory, data reading speed is so not only caused to reduce, I/O expense is excessive, and loads the spatial cache that unwanted field wastes preciousness, reduces cache hit rate, make follow-up data processing delay, the performance of system is affected.
Secondly, the field of record can be divided into the conventional field of inquiry and non-common field, if be placed on cheap apparatus by non-common field, can reduce carrying cost.But existing row memory technology feature determines conventional field and the field that is of little use is Coutinuous store on disk, occupies same storage resources.This is unfavorable for the reasonable distribution of resource apparatus.
Columnar database appear at the above deficiency that compensate for line data storehouse to a certain extent.Its feature is stored by row by record.But this also causes it to there are some problems when inquiring about application.Such as, if the demand of inquiry application carries out query count according to the value of a certain row, obtain front some the record numbers that the degree of correlation is the highest, and return the value of some appointment row (field) of these some records.Columnar database is when realizing this demand, store by row because record, so after the value arranged according to certain is inquired about and is obtained relative recording numbering, the value of other appointment row recorded can not be obtained immediately, but also need first to search these appointment row, and then record is searched from these appointment row, read out the respective value of record.This search procedure reduces the performance of inquiry.
Summary of the invention
For solving above-mentioned middle Problems existing and defect, the invention provides a kind of database storage method of ranks mixing of application oriented storage magnanimity unstructured data object.Described technical scheme is as follows:
A database storage method for ranks mixing, comprising:
Create the amount of physical memory of table and table correspondence, establish the corresponding relation of row and amount of physical memory according to 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 corresponding amount of physical memory as row.
The beneficial effect of technical scheme provided by the invention is:
Be efficiently avoid by ranks mixing storage means provided by the invention and entirely show inquiry, reduce I/O expense, improve the speed of digital independent and the query performance of full-text database.
Accompanying drawing explanation
Fig. 1 is the database storage method process flow diagram of ranks mixing;
Fig. 2 is the storage architecture design drawing of table.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail:
Present embodiments provide the database storage method of a kind of ranks mixing, wherein,
See Fig. 1, the method comprises the following steps:
Step 10 creates the amount of physical memory of table and table correspondence, establishes the corresponding relation of row and storage space according to application demand;
Step 20 inserts record in table, and divides into groups by the corresponding relation of row and amount of physical memory;
The train value of record is written in corresponding amount of physical memory as row by step 30.
Above-mentioned steps 10 establishment table comprises the title of establishment table, field and the amount of physical memory needed for allocation table, and establish the corresponding relation of row and amount of physical memory, above-mentioned row are field.In the present embodiment, the corresponding one or more amount of physical memory (as shown in Figure 2) of each table, if do not do special appointment during 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, application creates new storage space.For the field in table, it can be specified when establishment table to be stored in which amount of physical memory, row (field) higher for frequency of utilization can be continuously stored in same storage space, to improve the efficiency of digital independent like this.
In above-mentioned steps 20, when inserting record in table, be the identification number that record establishment one is unique in the table, and by record by row (field) cutting; According to the mapping table of field and amount of physical memory, divided into groups by train value (field value), the train value (field value) that correspond to the row of same amount of physical memory is divided into same group, and each group can be considered as a row vector.
Above-mentioned steps 30, after train value (field value) grouping by recording, using train value group as a row vector (an one dimension character string), is written to corresponding amount of physical memory.Due to what undertaken storing in order by record identify number during data in amount of physical memory, therefore the particular location of inserting line vector is also determined according to the size of record identify number.If this corresponding amount of physical memory is full, cannot perform insertion, then application opens up a new amount of physical memory to store, and the mapping table of more newer field and storage space.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (1)

1. a database storage method for ranks mixing, it is characterized in that, described method comprises:
Create the amount of physical memory of table and table correspondence, the corresponding relation of row and amount of physical memory is established according to application demand, the table of described establishment comprises the title of table, field and the amount of physical memory needed for allocation table, and establish the corresponding relation of field and amount of physical memory, the corresponding one or more amount of physical memory of each table;
In table, insert record, and divide into groups by the corresponding relation of row and amount of physical memory, when inserting record in table, be the identification number that record establishment one is unique in the table, and row cutting is pressed in record; According to row and the mapping table of storage space, divided into groups by train value, the train value that correspond to same amount of physical memory is divided into same group, and each group is considered as a row vector;
Be written in corresponding amount of physical memory using the train value of record as row, undertaken storing in order by record identify number according to the data in amount of physical memory, therefore the particular location of inserting line vector is also determine according to the size of record identify number.
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 CN102682108A (en) 2012-09-19
CN102682108B true 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)

Families Citing this family (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
CN104424287B (en) * 2013-08-30 2019-06-07 深圳市腾讯计算机系统有限公司 Data query method and apparatus
CN104516912B (en) * 2013-09-29 2018-06-26 中国移动通信集团黑龙江有限公司 A kind of dynamic date storage method and device
CN103678556B (en) * 2013-12-06 2017-10-10 华为技术有限公司 The method and processing equipment of columnar database processing
CN105408893B (en) 2014-02-10 2019-04-26 华为技术有限公司 A kind of data processing and wiring method and relevant apparatus
CN104572893B (en) * 2014-12-24 2018-02-27 天津南大通用数据技术股份有限公司 A kind of data mixing storage method 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
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

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

Also Published As

Publication number Publication date
CN102682108A (en) 2012-09-19

Similar Documents

Publication Publication Date Title
CN102682108B (en) Row and line mixed database storage method
CN102129458B (en) Method and device for storing relational database
CN104794123B (en) A kind of method and device building NoSQL database indexes 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
CN105117417A (en) Read-optimized memory database Trie tree index method
CN107391544B (en) Processing method, device and equipment of column type storage data and computer storage medium
CN104361113A (en) OLAP (On-Line Analytical Processing) query optimization method in memory and flesh memory hybrid storage mode
CN103440245A (en) Line and column hybrid storage method of database system
CN109213761A (en) Table method is divided in point library that a kind of spread exempts from migration
CN102629269A (en) Searching and storing method for embedded database
WO2016134628A1 (en) Hybrid data distribution in a massively parallel processing architecture
CN103914483A (en) File storage method and device and file reading method and device
CN105159616A (en) Disk space management method and device
CN102890721A (en) Database establishment method and database establishment system based on column storage technology
CN105630934A (en) Data statistic method and system
CN102779138A (en) Hard disk access method of real time data
CN104424240A (en) Multi-table correlation method and system, main service node and computing node
CN105677904A (en) Distributed file system based small file storage method and device
CN103136244A (en) Parallel data mining method and system based on cloud computing platform
CN104572785A (en) Method and device for establishing index in distributed form
CN104765754A (en) Data storage method and device
CN101963993B (en) Method for fast searching database sheet table record
CN108304527B (en) Data extraction method
CN104714898A (en) Cache allocation method and device

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: 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.