Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for storing relational database

A database and relational technology, applied in the database field, can solve the problems of increasing overhead, reducing performance, and being unsuitable for storing relational data, and achieving the effect of reducing overhead, saving overhead, and improving query performance

Active Publication Date: 2012-12-12
BEIJING CLOUDWAVE TIMES TECH CO LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, prior art 1 has the following deficiencies: firstly, the primary key index occupies a certain amount of storage space, which increases system overhead. The overhead of checking whether the primary key is unique, because the system has to check the uniqueness of the primary key in all partitions, the more partitions, the greater the overhead of checking; secondly, due to row-by-row storage, all columns are stored together, and columns cannot be read on demand , to read some columns, you have to read all columns first and then filter out unnecessary columns, which increases hard disk IO and reduces performance
However, although prior art 2 solves the problem that the row storage database cannot read columns on demand, it still has the following defects: when inserting records, they are stored separately by column, and the values ​​of each column are stored in sorted order, which increases the storage time. The overhead; because the column is stored separately, it is necessary to connect the data to connect the columns together to reconstruct the original record, and maintaining the connection data also increases the burden on the system
Although the MonetDB of the prior art 3 is also a database system stored by column, it also has the advantage of reading columns on demand in column databases, but there are still the following defects: when storing each column, the ROWID of the record needs to be stored, and the system needs to pass the ROWID To connect column values ​​to rebuild records, and ROWID is usually a long integer or longer type, which increases the overhead of the system
Although Google BigTable stores records sorted and segmented by RowKey, it introduces the concept of column family (Column Family), that is, a record is composed of one or more column families, and is stored by column family when stored. A column family corresponds to a data file (that is, a Google SSTable file), so that a table segment (Tablet) corresponds to one or more data files (SSTable files), and the values ​​it stores in the column family are all Key / Value form, not suitable for storing relational data

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for storing relational database
  • Method and device for storing relational database
  • Method and device for storing relational database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but not to limit the present invention.

[0038] Such as figure 1 As shown, the storage method flow of the relational database in the embodiment of the present invention may include:

[0039]Execute step 101 first: establish a control table to store the identification of the table segment and the minimum and maximum primary key values ​​of the records stored in the table segment, and sort by the minimum primary key value of the table segment;

[0040] When a new record is inserted into the table:

[0041] If there is no record in the table, then perform step 102: create a table segment of the table, a...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for storing a relational database. The method comprises the following steps: building a control table for storing the information of a table segment, wherein the information of the table segment comprises a table segment identification as well as a minimum major key value and a maximum major key value which are stored and recorded by the table segment; when a new record is inserted into a table, inserting the new record into the memory table of the table segment of the table; when the information of the table segment is changed, correspondingly updating in the control table; when the memory occupied by all records in the memory table of the table segment reaches a predefined upper limit, storing all the records in the memory table of the table segment to a table segment data file corresponding to the table segment on a hard disk; and clearing the memory table of the table segment. According to the method and the device, the relational database can be automatically segmented and stored in lines, thereby saving the cost for storing. The storage structure of the relational database in the device is suitable to serve as the storage basis of the relational database.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a storage method and device for relational databases. Background technique [0002] Existing technologies provide various methods for implementing database storage. [0003] For example, prior art 1 provides a row storage database method, such as Oracle (Oracle Database Concepts) and other methods. The method stores the records of the relational database row by row according to the first-in-first-storage rule, and establishes a unique index such as a B+ tree for the primary key. However, prior art 1 has the following deficiencies: firstly, the primary key index occupies a certain amount of storage space, which increases system overhead. The overhead of checking whether the primary key is unique, because the system has to check the uniqueness of the primary key in all partitions, the more partitions, the greater the overhead of checking; secondly, due to row-by-row storage, al...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F17/30
Inventor 胡劲松
Owner BEIJING CLOUDWAVE TIMES TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products