CN106909671A - A kind of method and system of NoSQL databases condition query - Google Patents
A kind of method and system of NoSQL databases condition query Download PDFInfo
- Publication number
- CN106909671A CN106909671A CN201710114459.8A CN201710114459A CN106909671A CN 106909671 A CN106909671 A CN 106909671A CN 201710114459 A CN201710114459 A CN 201710114459A CN 106909671 A CN106909671 A CN 106909671A
- Authority
- CN
- China
- Prior art keywords
- data
- nosql
- solr
- nosql databases
- condition query
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of method and system of NoSQL databases condition query.The inventive method is comprised the following steps:In newly-increased data, after writing data into Solr and setting up data directory, NoSQL databases are write data into;Processing data when, to the index process in solr after, the data in NoSQL databases are processed;When data are inquired about, after Solr inquires corresponding major key, corresponding partial data is loaded from NoSQL.Present system is corresponding with the above method.The present invention is not in the case where NoSQL databases are changed in itself, by way of external index, with reference to NoSQL database keys query function and the condition query function of Solr, the perfect condition query function of NoSQL databases increased the scene of its substitution traditional Relational DataBase.
Description
Technical field
The invention belongs to computerized information storage index technology field, more particularly to a kind of NoSQL databases condition query
Method and system.
Background technology
With the rise of big data concept, increasing system employs NoSQL databases to substitute traditional relation
Type database, to solve big data quantity in the case of, the problem that the performance of relevant database drastically declines.But, for master
The NoSQL databases of stream, its strong point is high-throughput, high availability, there is natural defect for condition query, most of
Only provide major key inquiry, and the function of not indexing substantially.
The content of the invention
It is an object of the invention to provide a kind of method and system of NoSQL databases condition query, it is intended to solve NoSQL
The incomplete problem of condition query of database, is not influenceing NoSQL databases in itself on the premise of function, there is provided condition is looked into
The function of inquiry.
The present invention is achieved in that a kind of method of NoSQL databases condition query, and the method is comprised the following steps:
S1, in newly-increased data, after writing data into Solr and setting up data directory, write data into NoSQL data
Storehouse;
S2, processing data when, to the index process in solr after, the data in NoSQL databases are processed;
S3, inquire about data when, after Solr inquires corresponding major key, corresponding complete number is loaded from NoSQL
According to.
Preferably, in step sl, in step s 2, the treatment includes the renewal or deletion to data.
The present invention further discloses a kind of system of NoSQL databases condition query, the system includes:
Data write. module, for writing data into Solr and after setting up data directory, writes data into NoSQL data
Storehouse;
Data processing module, for processing data when, to the index process in solr after, in NoSQL databases
Data processed;
Data inquiry module, for when data are inquired about, after Solr inquires corresponding major key, adds from NoSQL
Carry corresponding partial data.
Preferably, in data processing module, the treatment includes the renewal or deletion to data.
Compared to the shortcoming and defect of prior art, the invention has the advantages that:The present invention is not changing NoSQL
Database in itself in the case of, by way of external index, with reference to NoSQL database keys query function and the condition of Solr
Query function, the perfect condition query function of NoSQL databases increased the scene of its substitution traditional Relational DataBase.
Brief description of the drawings
The step of Fig. 1 is one embodiment of method of NoSQL databases condition query of the present invention flow chart;
Fig. 2 is the structural representation of the embodiment of system one of NoSQL databases condition query of the present invention.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Reference picture 1, the invention discloses a kind of method of NoSQL databases condition query, the method is comprised the following steps:
S1, in newly-increased data, after writing data into Solr and setting up data directory, write data into NoSQL data
Storehouse;
S2, processing data when, to the index process in solr after, the data in NoSQL databases are processed;
S3, inquire about data when, after Solr inquires corresponding major key, corresponding complete number is loaded from NoSQL
According to.
As described in step S1, in newly-increased data, in writing data into Solr first, if it fails, then retrying certain time
Number, if still failed after reaching number of retries, write-in failure returns to relevant error information.If write successfully, continue
Write-in NoSQL databases, if the write-in failure of NoSQL databases, equally retries certain number of times, if still failed, rollback
The operation of Solr, returns to failure information, otherwise.
As described in step S2, the treatment includes the renewal of data or deletion.In renewal/deletion data, update first/
The data in Solr are deleted, if it fails, then retrying certain number of times, if still failed after reaching number of retries, operation is lost
Lose, return to relevant error information.If operated successfully, continue to operate NoSQL databases, if NoSQL database manipulations lose
Lose, equally retry certain number of times, if still failed, the operation of rollback Solr returns to failure information.
As described in step S3, when condition query is carried out, Solr is inquired about first, be met the data major key of condition, such as
Fruit success, the then information of the corresponding major key inquired about in NoSQL databases, if it fails, then returning to the error message of correlation.
The data syn-chronization that it is critical only that Solr and NoSQL databases of the invention, if asynchronous, occurs dirty number
According to.The present invention in the case where NoSQL databases are not changed in itself, by way of external index, with reference to NoSQL database masters
The condition query function of key query function and Solr, the perfect condition query function of NoSQL databases increased its substitution and pass
The scene of system relevant database.
Shown in reference picture 2, the present invention further discloses a kind of system of NoSQL databases condition query, the system bag
Include:
Data write. module 1, for writing data into Solr and after setting up data directory, writes data into NoSQL numbers
According to storehouse;
Data processing module 2, for processing data when, to the index process in solr after, in NoSQL databases
Data processed;
Data inquiry module 3, for when data are inquired about, after Solr inquires corresponding major key, adds from NoSQL
Carry corresponding partial data
In Data write. module 1, in newly-increased data, in writing data into Solr first, if it fails, then retrying one
Determine number of times, if still failed after reaching number of retries, write-in failure returns to relevant error information.If write successfully,
NoSQL databases are continued to write to, if the write-in failure of NoSQL databases, equally retries certain number of times, if still failed,
The operation of rollback Solr, returns to failure information, otherwise.
In data processing module 2, the treatment includes the renewal of data or deletion.In renewal/deletion data, first
The data in Solr are updated/deleted, if it fails, then retrying certain number of times, if still failed after reaching number of retries, is grasped
Work fails, and returns to relevant error information.If operated successfully, continue to operate NoSQL databases, if NoSQL databases are grasped
Work fails, and equally retries certain number of times, if still failed, the operation of rollback Solr returns to failure information.
In data inquiry module 3, when condition query is carried out, Solr is inquired about first, be met the data master of condition
Key, if it succeeds, the information of the corresponding major key in inquiry NoSQL databases, if it fails, then returning to related mistake letter
Breath.
The data syn-chronization that it is critical only that Solr and NoSQL databases of the invention, if asynchronous, occurs dirty number
According to.The present invention in the case where NoSQL databases are not changed in itself, by way of external index, with reference to NoSQL database masters
The condition query function of key query function and Solr, the perfect condition query function of NoSQL databases increased its substitution and pass
The scene of system relevant database.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all in essence of the invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.
Claims (4)
1. a kind of method of NoSQL databases condition query, it is characterised in that the method is comprised the following steps:
S1, in newly-increased data, after writing data into Solr and setting up data directory, write data into NoSQL databases;
S2, processing data when, to the index process in solr after, the data in NoSQL databases are processed;
S3, inquire about data when, after Solr inquires corresponding major key, corresponding partial data is loaded from NoSQL.
2. the method for NoSQL databases condition query as claimed in claim 1, it is characterised in that in step sl, in step
In S2, the treatment includes the renewal or deletion to data.
3. a kind of system of NoSQL databases condition query, it is characterised in that the system includes:
Data write. module, for writing data into Solr and after setting up data directory, writes data into NoSQL databases;
Data processing module, for processing data when, to the index process in solr after, to the number in NoSQL databases
According to being processed;
Data inquiry module, for when data are inquired about, after Solr inquires corresponding major key, it to be right to be loaded from NoSQL
The partial data answered.
4. the system of NoSQL databases condition query as claimed in claim 3, it is characterised in that in data processing module,
The treatment includes the renewal or deletion to data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710114459.8A CN106909671A (en) | 2017-02-28 | 2017-02-28 | A kind of method and system of NoSQL databases condition query |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710114459.8A CN106909671A (en) | 2017-02-28 | 2017-02-28 | A kind of method and system of NoSQL databases condition query |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106909671A true CN106909671A (en) | 2017-06-30 |
Family
ID=59209090
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710114459.8A Pending CN106909671A (en) | 2017-02-28 | 2017-02-28 | A kind of method and system of NoSQL databases condition query |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106909671A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103390038A (en) * | 2013-07-16 | 2013-11-13 | 西安交通大学 | HBase-based incremental index creation and retrieval method |
CN104102710A (en) * | 2014-07-15 | 2014-10-15 | 浪潮(北京)电子信息产业有限公司 | Massive data query method |
CN104503985A (en) * | 2014-12-03 | 2015-04-08 | 浪潮电子信息产业股份有限公司 | Method for automatically creating Solr index file by Hbase data |
CN104636389A (en) * | 2013-11-14 | 2015-05-20 | 博雅网络游戏开发(深圳)有限公司 | Hbase database real-time query achieving method and system |
CN104731945A (en) * | 2015-03-31 | 2015-06-24 | 浪潮集团有限公司 | Full-text searching method and device based on HBase |
CN105138592A (en) * | 2015-07-31 | 2015-12-09 | 武汉虹信技术服务有限责任公司 | Distributed framework-based log data storing and retrieving method |
CN105320746A (en) * | 2015-09-25 | 2016-02-10 | 北京北信源软件股份有限公司 | Big data based index acquisition method and system |
CN106326429A (en) * | 2016-08-25 | 2017-01-11 | 武汉光谷信息技术股份有限公司 | Hbase second-level query scheme based on solr |
-
2017
- 2017-02-28 CN CN201710114459.8A patent/CN106909671A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103390038A (en) * | 2013-07-16 | 2013-11-13 | 西安交通大学 | HBase-based incremental index creation and retrieval method |
CN104636389A (en) * | 2013-11-14 | 2015-05-20 | 博雅网络游戏开发(深圳)有限公司 | Hbase database real-time query achieving method and system |
CN104102710A (en) * | 2014-07-15 | 2014-10-15 | 浪潮(北京)电子信息产业有限公司 | Massive data query method |
CN104503985A (en) * | 2014-12-03 | 2015-04-08 | 浪潮电子信息产业股份有限公司 | Method for automatically creating Solr index file by Hbase data |
CN104731945A (en) * | 2015-03-31 | 2015-06-24 | 浪潮集团有限公司 | Full-text searching method and device based on HBase |
CN105138592A (en) * | 2015-07-31 | 2015-12-09 | 武汉虹信技术服务有限责任公司 | Distributed framework-based log data storing and retrieving method |
CN105320746A (en) * | 2015-09-25 | 2016-02-10 | 北京北信源软件股份有限公司 | Big data based index acquisition method and system |
CN106326429A (en) * | 2016-08-25 | 2017-01-11 | 武汉光谷信息技术股份有限公司 | Hbase second-level query scheme based on solr |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10235375B1 (en) | Persistent file system objects for management of databases | |
US7769727B2 (en) | Resolving update-delete conflicts | |
US8352425B2 (en) | Parallel apply processing in data replication with preservation of transaction integrity and source ordering of dependent updates | |
CN110799948A (en) | System and method for restoring a data set of a database for a point in time | |
US8560500B2 (en) | Method and system for removing rows from directory tables | |
US20080313198A1 (en) | System and method of checking integrity of content and metadata | |
CN104166605B (en) | Data backup method and system based on incremental data files | |
US8473955B2 (en) | Reducing processing overhead and storage cost by batching task records and converting to audit records | |
US20010051954A1 (en) | Data updating apparatus that performs quick restoration processing | |
US20190278770A1 (en) | Time Series Data Management Method, Device, And Apparatus | |
US8108356B2 (en) | Method for recovering data in a storage system | |
US11003540B2 (en) | Method, server, and computer readable medium for index recovery using index redo log | |
WO2017166815A1 (en) | Data updating method and device for a distributed database system | |
US10459804B2 (en) | Database rollback using WAL | |
CN111522791B (en) | Distributed file repeated data deleting system and method | |
CN107229540A (en) | A kind of database restoring method and system based on time point | |
CN109889588B (en) | File acquisition method and device, computer equipment and storage medium | |
CN106155838A (en) | A kind of database back-up data restoration methods and device | |
CN109189759A (en) | Method for reading data, data query method, device and equipment in KV storage system | |
US20160026536A1 (en) | Recovery path selection during database restore | |
EP4446906A1 (en) | Consistency checking for distributed analytical database systems | |
EP3731109B1 (en) | Versioned backup on object addressable storage system | |
CN106909671A (en) | A kind of method and system of NoSQL databases condition query | |
CN106997305B (en) | Transaction processing method and device | |
CN111897837B (en) | Data query method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170630 |