CN101587476B - Memory database system for realizing distributed storage and application thereof - Google Patents

Memory database system for realizing distributed storage and application thereof Download PDF

Info

Publication number
CN101587476B
CN101587476B CN2008100976314A CN200810097631A CN101587476B CN 101587476 B CN101587476 B CN 101587476B CN 2008100976314 A CN2008100976314 A CN 2008100976314A CN 200810097631 A CN200810097631 A CN 200810097631A CN 101587476 B CN101587476 B CN 101587476B
Authority
CN
China
Prior art keywords
memory database
message processor
interface message
imp
database
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
CN2008100976314A
Other languages
Chinese (zh)
Other versions
CN101587476A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN2008100976314A priority Critical patent/CN101587476B/en
Publication of CN101587476A publication Critical patent/CN101587476A/en
Application granted granted Critical
Publication of CN101587476B publication Critical patent/CN101587476B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a memory database system for realizing distributed storage and an application thereof. The system comprises an interface message processor and a plurality of memory databases, wherein the interface message processor is used for storing each database table in real databases and a corresponding relation of the memory databases and distributing an sql request to corresponding memory databases according to a database table in the sql request after receiving the sql request of an access client; the memory databases are used for inquiring the information of the database tables responded by the memory databases from the interface message processor and then reading data in the database tables from the corresponding real databases; and when the sql request distributed by the interface message processor is received, the memory databases execute an corresponding inquiring or non inquiring operation according to the sql request distributed by the interface message processor. The invention realizes the distributed storage of the memory databases by introducing the interface message processor and has simpler realization and lower cost.

Description

A kind of memory database system and application that realizes distributed storage
Technical field
The present invention relates to computer communication field, relate in particular to the memory database technical field.
Background technology
In communication information field, database is more and more important now.But along with the increase of portfolio, performance of database can't reach requirement just more and more becomes a nerve-wracking problem.Several kinds of Sybase: Oracle, DB2, Sqlserver, Sybase etc. can run into the problem that performance can't meet the demands.Because their database access all can only be accomplished Millisecond.Database is optimized the contribution of the raising of database visit digit rate is had only 30% at most.Many times, all be compelled to revise operation flow, reduce the number of times of accessing database.
In order to improve performance, everybody generally acknowledges that using memory database is a kind of good mode.Because the visit of memory database can be brought up to the microsecond rank.Some companies have also all developed the memory database product of oneself, like TimesTen of Oracle etc.But the memory database of these producers all has following shortcoming:
Because need be, thereby cause the performance wasteness of memory database to intact parsing of sql statement in its data storehouse;
Only support the database product that self produces, do not have versatility.
Summary of the invention
In view of above-mentioned analysis, the present invention aims to provide a kind of memory database system and application that realizes distributed storage, by introducing interface message processor (IMP), has realized the distributed storage of memory database.
The object of the invention is mainly realized through following technical scheme:
The invention provides a kind of memory database system of realizing distributed storage, said system comprises: interface message processor (IMP) and a plurality of memory database, wherein,
Said interface message processor (IMP); Be used for storing the corresponding relation of each database table of True Data storehouse and memory database; And after the sql request that receives access client,, said sql request is distributed in the corresponding memory database according to the database table in the said sql request;
Said memory database; Be used for obtaining the information of own responsible database table from interface message processor (IMP) inquiry; From the True Data storehouse of correspondence, read in the data in this database table then; And; When receiving the sql request of said interface message processor (IMP) distribution, said memory database is carried out corresponding inquiry or non-query manipulation according to the sql request of said interface message processor (IMP) distribution;
Control desk is used for according to user's requirement whole memory database system being configured, and through making configuration take-effective alternately with interface message processor (IMP).
Further, said memory database also comprises:
Timer is used for setting-up time at interval;
Lock unit is used for the time interval based on the timer setting, regularly reads to take place to change the data content that changes, and it is synchronized in the corresponding True Data storehouse.
The present invention also provides a kind of method of utilizing above-mentioned memory database system to realize the storage of DATA DISTRIBUTION formula, and said method comprises:
Steps A: memory database obtains the information of own responsible database table from interface message processor (IMP) inquiry, from the True Data storehouse of correspondence, reads in the data in this database table then;
Step B: receiving the sql request of access client when interface message processor (IMP) after; Corresponding relation based on each database table and memory database in the True Data storehouse of database table in the said sql request and the storage of said interface message processor (IMP) is distributed to said sql request in the corresponding memory database;
Step C: the sql request that distribution obtains according to interface message processor (IMP) of said memory database, the data in the memory database are inquired about or non-query manipulation.
Further, said step C specifically comprises:
The sql request that distribution obtains according to interface message processor (IMP) of said internal storage data is judged:
If query manipulation then returns the data set that inquires, if be non-query manipulation, then operation is deleted, revises, added to data accordingly, and the specifying information of the just deletion carried out of data, modification, interpolation operation writes file and carries out record.
Further, said method also comprises:
According to the time interval of setting, regularly read the data that change through non-query manipulation, and it is synchronized in the corresponding True Data storehouse.
Further, among the said step C, when said memory database receives that a plurality of sql of interface message processor (IMP) distribution ask, said sql is asked serial processing successively.
Further, said sql request comprises following field at least:
The specifying information of action type, database table name, operation and the serial number of operation.
Beneficial effect of the present invention is following:
The present invention has realized the distributed storage of memory database through introducing interface message processor (IMP), implements fairly simplely, and cost is lower.
Other features and advantages of the present invention will be set forth in specification subsequently, and from specification, becoming apparent of part perhaps understood by embodiment of the present invention.The object of the invention can be realized through the structure that in the instructions of being write, claims and accompanying drawing, is particularly pointed out and obtained with other advantages.
Description of drawings
Fig. 1 is the structural representation of the said system of the embodiment of the invention;
Fig. 2 is the schematic flow sheet of the said method of the embodiment of the invention;
Fig. 3 is in the said method of the embodiment of the invention, the schematic flow sheet of memory database and True Data storehouse synchronizing process.
Embodiment
Specifically describe preferential embodiment of the present invention below in conjunction with accompanying drawing, wherein, accompanying drawing constitutes the application's part, and is used to explain principle of the present invention with embodiments of the invention.
At first combine accompanying drawing that the said memory database system of the embodiment of the invention is elaborated.
As shown in Figure 1, Fig. 1 is the structural representation of the said memory database system of the embodiment of the invention, specifically can comprise: interface message processor (IMP), control desk, a plurality of memory database, set forth in detail in the face of various piece down.
Interface message processor (IMP) mainly is responsible for distribution, the realization of storing process and the management of whole memory database system of sql message; Be exactly specifically; Store a plurality of database tables in True Data storehouse and the corresponding relation of memory database in the said interface message processor (IMP) in advance; Receiving the sql request of access client when said interface message processor (IMP) after; According to the database table that relates in this sql request, this sql request is distributed to corresponding memory database.
Memory database; The corresponding a plurality of True Datas of a plurality of memory databases storehouse; It mainly is responsible for the visit of many database tables in True Data storehouse, and promptly when memory database starts when, said memory database is inquired about through a plurality of database tables in the True Data storehouse of storing from interface message processor (IMP) and the corresponding relation of memory database; The information of the database table that obtains oneself being responsible for is read in the data content of these database tables then from the corresponding True Data storehouse of these database tables; And; Receive the sql request of interface message processor (IMP) distribution when said memory database after; Judge according to this sql information requested: if query manipulation then returns the data set that inquiry needs, if be non-query manipulation; Then according to sql requested operation type data are done corresponding change, the modification content with these data writes file with certain format then.
Wherein, said sql message comprises following field at least: 1, action type, as: add, delete, revise, inquire about, carry out storing process; 2, database table name; 3, the specifying information of operation: add, deletion, revise, inquiry, needed information when carrying out storing process, when adding, the value of the field of interpolation, the characteristic of deletion record etc. in the time of deletion; 4, the serial number of operation, the ID that promptly each operation is endowed.
Control desk, the user is configured whole memory database system through said control desk, and through making configuration take-effective alternately with interface message processor (IMP); Deploy content comprise memory database IP, the information extraction of which database table in the True Data storehouse is advanced that memory database system is managed and some other correlation parameter.
Realize that to utilizing the said system of the embodiment of the invention method of DATA DISTRIBUTION formula storage is elaborated below in conjunction with accompanying drawing.
As shown in Figure 2, Fig. 2 is the schematic flow sheet of said method, specifically can may further comprise the steps:
Step 201: interface message processor (IMP) is received the sql request of access client;
Step 202: interface message processor (IMP) according in time to the sql request in the database table distribution sql that relates to ask memory database;
Step 203: the memory database of receiving the sql request judges whether this sql request is query manipulation, if query manipulation, execution in step 206; If be non-query manipulation, execution in step 204;
Step 204: the data in the memory database are carried out operations such as corresponding modification, deletion, interpolation, the specifying information of the deletion of then data being carried out, modification, interpolation operation writes predetermined file and carries out record, and execution in step 205 then;
Step 205: the result that memory database will carry out non-query manipulation sends to interface message processor (IMP);
Step 206: in memory database, inquire about corresponding data based on query contents in the sql request, and the result that will inquire returns to interface message processor (IMP);
Step 207: interface message processor (IMP) returns to access client with the result of the query manipulation that receives or the result of non-query manipulation.
The said method of the embodiment of the invention also comprises: memory database regularly with revise, delete, the data of non-query manipulation such as interpolation are through visiting the True Data storehouse, are synchronized in the True Data storehouse, and are specifically as shown in Figure 3, can may further comprise the steps:
Step 301: memory database has carried out operations such as modification, deletion or interpolation according to the non-query manipulation of sql request to data wherein;
Step 302: memory database is with revising, delete or the data of operation such as interpolation writing in the predetermined file;
Step 303: the file in the memory database timing scan step 302, and read the content in the file is synchronized to wherein the data mode through visit True Data storehouse in the corresponding True Data storehouse.
In sum, the embodiment of the invention provides a kind of memory database system and application that realizes distributed storage, through introducing interface message processor (IMP), has realized the distributed storage of memory database, implements very simply, has the following advantages:
Since be with the True Data storehouse in the partial database table corresponding, so at the scene construction the time without newly added equipment, directly on the equipment in True Data storehouse, realize just passable;
Because the sql that interface message processor (IMP) is received request has been to be encapsulated by the processing logic of access client with data,, so just can not cause the performance waste problem of memory database so no longer need the resolving of sql statement;
Because each independent memory database; To the non-query manipulation that receives all is serial processing; And each operation is all only carried out in the database table of own individual responsibility; So just successfully avoided data to fight for causing deadlock, dirtyly read, the dirty generation of writing, memory database also need not be that the own database table of being responsible for is set up and locked.
The record that data are revised is through the mode of written document, so just can avoid system exception perhaps the machine of delaying memory database and the nonsynchronous phenomenon generation of True Data database data appear later on.
The above; Be merely the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is in the technical scope that the present invention discloses; The variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.

Claims (7)

1. a memory database system of realizing distributed storage is characterized in that, comprising: interface message processor (IMP) and a plurality of memory database, wherein,
Said interface message processor (IMP); Be used for storing the corresponding relation of each database table of True Data storehouse and memory database; And after the sql request that receives access client,, said sql request is distributed in the corresponding memory database according to the database table in the said sql request;
Said memory database; Be used for obtaining the information of own responsible database table from interface message processor (IMP) inquiry; From the True Data storehouse of correspondence, read in the data in this database table then; And; When receiving the sql request of said interface message processor (IMP) distribution, said memory database is carried out corresponding inquiry or non-query manipulation according to the sql request of said interface message processor (IMP) distribution;
Control desk is used for according to user's requirement whole memory database system being configured, and through making configuration take-effective alternately with interface message processor (IMP).
2. according to the system of claim 1, it is characterized in that said memory database also comprises:
Timer is used for setting-up time at interval;
Lock unit is used for the time interval based on the timer setting, regularly reads to take place to change the data content that changes, and it is synchronized in the corresponding True Data storehouse.
3. utilize the described memory database system of claim 1 to realize the method for DATA DISTRIBUTION formula storage, said method comprises:
Steps A: memory database obtains the information of own responsible database table from interface message processor (IMP) inquiry, from the True Data storehouse of correspondence, reads in the data in this database table then;
Step B: receiving the sql request of access client when interface message processor (IMP) after; Corresponding relation based on each database table and memory database in the True Data storehouse of database table in the said sql request and the storage of said interface message processor (IMP) is distributed to said sql request in the corresponding memory database;
Step C: the sql request that distribution obtains according to interface message processor (IMP) of said memory database, the data in the memory database are inquired about or non-query manipulation.
4. method according to claim 3 is characterized in that, said step C specifically comprises:
The sql request that distribution obtains according to interface message processor (IMP) of said internal storage data is judged:
If query manipulation then returns the data set that inquires, if be non-query manipulation, then operation is deleted, revises, added to data accordingly, and the specifying information of the just deletion carried out of data, modification, interpolation operation writes file and carries out record.
5. according to claim 3 or 4 described methods, it is characterized in that said method also comprises:
According to the time interval of setting, regularly read the data that change through non-query manipulation, and it is synchronized in the corresponding True Data storehouse.
6. according to claim 3 or 4 described methods, it is characterized in that, among the said step C, when said memory database receives that a plurality of sql of interface message processor (IMP) distribution ask, said sql is asked serial processing successively.
7. according to claim 3 or 4 described methods, it is characterized in that said sql request comprises following field at least:
The specifying information of action type, database table name, operation and the serial number of operation.
CN2008100976314A 2008-05-22 2008-05-22 Memory database system for realizing distributed storage and application thereof Active CN101587476B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100976314A CN101587476B (en) 2008-05-22 2008-05-22 Memory database system for realizing distributed storage and application thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100976314A CN101587476B (en) 2008-05-22 2008-05-22 Memory database system for realizing distributed storage and application thereof

Publications (2)

Publication Number Publication Date
CN101587476A CN101587476A (en) 2009-11-25
CN101587476B true CN101587476B (en) 2012-02-08

Family

ID=41371726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100976314A Active CN101587476B (en) 2008-05-22 2008-05-22 Memory database system for realizing distributed storage and application thereof

Country Status (1)

Country Link
CN (1) CN101587476B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944124B (en) * 2010-09-21 2012-07-04 卓望数码技术(深圳)有限公司 Distributed file system management method, device and corresponding file system
CN102033930A (en) * 2010-12-17 2011-04-27 北京世纪互联工程技术服务有限公司 Distributed memory database system
CN102402596B (en) * 2011-11-07 2016-01-20 北京搜狗科技发展有限公司 A kind of reading/writing method of master slave separation database and system
CN102968423A (en) * 2012-03-27 2013-03-13 广州市国迈科技有限公司 Design of high-performance private cloud storage node file system on basis of data container
CN103365881B (en) * 2012-03-30 2016-03-23 腾讯科技(深圳)有限公司 Based on data access method and the system of data characteristics
CN104252501B (en) * 2013-06-29 2018-08-21 华为技术有限公司 A kind of computing device and method executing database manipulation order
CN103970902B (en) * 2014-05-27 2017-05-24 重庆大学 Method and system for reliable and instant retrieval on situation of large quantities of data
CN105373541B (en) * 2014-08-22 2019-03-22 博雅网络游戏开发(深圳)有限公司 The processing method and system of the data operation request of database
CN104333512B (en) * 2014-10-30 2017-07-28 北京思特奇信息技术股份有限公司 A kind of distributed memory database accesses system and method
CN106127074B (en) * 2016-06-24 2018-12-21 江西金格科技股份有限公司 A kind of storage of storage equipment and its data and read method based on intelligent key
US11429611B2 (en) 2019-09-24 2022-08-30 International Business Machines Corporation Processing data of a database system
CN112115150B (en) * 2020-08-03 2024-03-19 上海金仕达软件科技股份有限公司 Data management method, terminal equipment and medium of embedded memory database

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1840766A2 (en) * 2006-03-28 2007-10-03 Sun Microsystems, Inc. Systems and methods for a distributed in-memory database and distributed cache
CN101051324A (en) * 2007-05-23 2007-10-10 中兴通讯股份有限公司 Transaction managing method for internal storage data bank

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1840766A2 (en) * 2006-03-28 2007-10-03 Sun Microsystems, Inc. Systems and methods for a distributed in-memory database and distributed cache
CN101051324A (en) * 2007-05-23 2007-10-10 中兴通讯股份有限公司 Transaction managing method for internal storage data bank

Also Published As

Publication number Publication date
CN101587476A (en) 2009-11-25

Similar Documents

Publication Publication Date Title
CN101587476B (en) Memory database system for realizing distributed storage and application thereof
CN105324770B (en) Effectively read copy
CA2139693C (en) Summary catalogs
CN105190623B (en) Log record management
CN103026355B (en) Data base management system
US6502088B1 (en) Method and system for improved access to non-relational databases
CN102880685B (en) Method for interval and paging query of time-intensive B/S (Browser/Server) with large data size
CN102395962B (en) Composite hash and list partitioning of database tables
CN101763347B (en) GIS (Geographical Information System) interface platform as well as network GIS management system and management method
CN101510209A (en) Method, system and server for implementing real time search
CN104915450A (en) HBase-based big data storage and retrieval method and system
CN100594497C (en) System for implementing network search caching and search method
CN103605698A (en) Cloud database system used for distributed heterogeneous data resource integration
CN105190533A (en) In place snapshots
JP2012098934A (en) Document management system, method for controlling document management system and program
CN103390041A (en) Method and system for providing data service based on middleware
EA002931B1 (en) Database synchronization and organization system and method
CN101169785A (en) Clustered database system dynamic loading balancing method
CN101360123B (en) Network system and management method thereof
CN101980207B (en) Method and system for implementing database access
CN102073739A (en) Method for reading and writing data in distributed file system with snapshot function
CN102262674A (en) Data synchronization method and system for distributed memory database
CN102043859A (en) Data updating method and device
CN105608126A (en) Method and apparatus for establishing secondary indexes for massive databases
CN104423982A (en) Request processing 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
C14 Grant of patent or utility model
GR01 Patent grant