CN104166739B - The index document handling method and device of analytical database - Google Patents

The index document handling method and device of analytical database Download PDF

Info

Publication number
CN104166739B
CN104166739B CN201410453740.0A CN201410453740A CN104166739B CN 104166739 B CN104166739 B CN 104166739B CN 201410453740 A CN201410453740 A CN 201410453740A CN 104166739 B CN104166739 B CN 104166739B
Authority
CN
China
Prior art keywords
database
index file
subregion
data
index
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
CN201410453740.0A
Other languages
Chinese (zh)
Other versions
CN104166739A (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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201410453740.0A priority Critical patent/CN104166739B/en
Publication of CN104166739A publication Critical patent/CN104166739A/en
Application granted granted Critical
Publication of CN104166739B publication Critical patent/CN104166739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/235Update request formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The invention discloses the index document handling method and device of a kind of analytical database.This method includes:Achievement data in first database is handled;The second subregion is created in the second database, the second database is the database for storing all historical datas in analytical database;First index file is copied in the corresponding index file of the second subregion;First index file is replaced to index file corresponding in the second subregion;Metadata maintenance is carried out to the index file in the second database, update the second database, solves the resource that analytical database synchronizes meeting Consumption Analysis database while dimension is carried out or index is handled, the problem of synchronizing function for causing analytical database to carry is unstable, synchronizing function stabilization is reached and has expended the few effect of resource.

Description

The index document handling method and device of analytical database
Technical field
The present invention relates to data processing field, in particular to a kind of index document handling method of analytical database And device.
Background technology
Database is the general data processing system of a unit or an application field, and what it was stored is to belong to enterprise With operating divisions, the set of the relevant data of organization and individual.Data in database are to share its information by numerous users And establish, have been extricated from the limitation and restriction of specific procedure.Different users can use database by respective usage In data;Multiple users can simultaneously in shared data bank data resource, i.e., different users can access data simultaneously Same data in storehouse.Data sharing not only meets requirement of each user to the information content, while also meets each use The requirement that information communicates between family.
Analytical database is commonly used appropriate statistical analysis technique and analyzed collecting the mass data come, and they are collected Digested with understanding, in the hope of the effect maximumlly developed the function of data, play data.Analytical database is useful in order to extract Information and the conclusion that formed can be subject to research and summary in detail to data.Analytical database is often carried out at dimension processing and index Reason, growth over time, some dimension tables in analytical database system can dramatic increase, such as the source with advertisement correlation Big dimension table either stores the fact that index dimension table, can all there is obvious growth over time.When data volume in dimension table When increasing to a certain amount level, for example, more than ten million or hundred million, analytical database carries out same while processing dimension table and index The resource of step meeting Consumption Analysis database, increases Installed System Memory pressure, and the synchronizing function for causing analytical database to carry is unstable, But there is no the solution of correlation in prior art.
The money of meeting Consumption Analysis database is synchronized while dimension is carried out or index is handled for analytical database Source, the problem of synchronizing function for causing analytical database to carry is unstable, effective solution is not yet proposed at present.
The content of the invention
It is a primary object of the present invention to provide the index document handling method and device of a kind of analytical database, to solve Analytical database synchronizes the resource of meeting Consumption Analysis database while dimension is carried out or index is handled, and causes to analyze number The problem of synchronizing function carried according to storehouse is unstable.
To achieve these goals, according to an aspect of the invention, there is provided a kind of index file of analytical database Processing method.Included according to the index document handling method of the analytical database of the present invention:To the index number in the first database According to being handled, wherein, the first database saves the data in a time-triggered protocol cycle and is stored in analytical database, First database includes the first subregion, and the first subregion includes the first index file, and achievement data is stored in the first index file; The second subregion is created in the second database, wherein, the second subregion is corresponding subregion with the first subregion, and the second database is Store the database of all historical datas in analytical database;First index file is copied to the corresponding index of the second subregion In file;First index file is replaced to index file corresponding in the second subregion;To the index file in the second database Metadata maintenance is carried out, updates the second database.
Further, metadata maintenance is carried out to the index file in the second database, the second database of renewal includes:Point From the index file in the second database and the second database;Update the second database;The number of loading second in the second database According to the index file separated in storehouse.
Further, metadata maintenance is carried out to the index file in the second database, the second database of renewal includes:Repair Change the filename that the second subregion in the second database corresponds to file in index file;It is corresponding to update the second subregion in the second database Lists of documents in index file, wherein, lists of documents have counted all index files in second the second subregion of database Filename;The versions of data of second database is changed to the versions of data of the first database;Update the second database.
Further, metadata maintenance is carried out to the index file in the second database, the second database of renewal includes:Obtain Take the version information of index file corresponding in the second database;Change the version of index file corresponding in the second database This information;Update the second database.
Further, update the second database also includes afterwards:Data query is carried out in the second database;Judge data Whether query process reports an error;In the case where data query process reports an error, it is relative that the first index file is copied to the second subregion In the index file answered;First index file is replaced to index file corresponding in the second subregion;To in the second database Index file carries out metadata maintenance, updates the second database.
To achieve these goals, according to another aspect of the present invention, there is provided a kind of index file of analytical database Processing unit.The device includes:Processing unit, for handling the achievement data in the first database, wherein, the first number The data in a time-triggered protocol cycle are saved according to storehouse and are stored in analytical database, and the first database includes first point Area, the first subregion include the first index file, and achievement data is stored in the first index file;Creating unit, for second The second subregion is created in database, wherein, the second subregion is corresponding subregion with the first subregion, and the second database is storage point Analyse the database of all historical datas in database;Copied cells is relative for the first index file to be copied into the second subregion In the index file answered;Replacement unit, for the first index file to be replaced to index file corresponding in the second subregion;First Updating block, for carrying out metadata maintenance to the index file in the second database, update the second database.
Further, the first updating block includes:Separation module, for separating in the second database and the second database Index file;First update module, for updating the second database;Load-on module, for loading second in the second database The index file separated in database.
Further, the first updating block includes:Modified module, correspondingly refer to for changing the second subregion in the second database Mark the filename of file in file;Second update module, corresponded to for updating the second subregion in the second database in index file Lists of documents, wherein, lists of documents are the filenames for having counted all index files in second the second subregion of database;Change Module, for the versions of data of the second database to be changed to the versions of data of the first database;3rd update module, for more New second database.
Further, the first updating block includes:Acquisition module, for obtaining index text corresponding in the second database The version information of part;Modified module, for changing the version information of index file corresponding in the second database;4th renewal Module, for updating the second database.
Further, also include after the first updating block:Query unit, for looking into carrying out data in the second database Ask;Judging unit, for judging whether data query process reports an error;Copied cells, for the feelings to be reported an error in data query process Under condition, the first index file is copied in the corresponding index file of the second subregion;Replacement unit, for the first index is literary Part replaces index file corresponding in the second subregion;Second updating block, for entering to the index file in the second database Row metadata is safeguarded, updates the second database.
By the present invention, handled using to the achievement data in the first database;Is created in the second database Two subregions;First index file is copied in the corresponding index file of the second subregion;First index file is replaced second Corresponding index file in subregion;Metadata maintenance is carried out to the index file in the second database, updates the second database, Solve the resource that analytical database synchronizes meeting Consumption Analysis database while dimension is carried out or index is handled, cause The problem of synchronizing function that analytical database carries is unstable, synchronizing function stabilization is reached and has expended the few effect of resource.
Brief description of the drawings
The accompanying drawing for forming the part of the application is used for providing a further understanding of the present invention, schematic reality of the invention Apply example and its illustrate to be used to explain the present invention, do not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart according to the first embodiment of the index document handling method of the analytical database of the present invention;
Fig. 2 is the flow chart according to the second embodiment of the index document handling method of the analytical database of the present invention;
Fig. 3 is the flow chart according to the 3rd embodiment of the index document handling method of the analytical database of the present invention;
Fig. 4 is the schematic diagram according to the first embodiment of the index document handling apparatus of the analytical database of the present invention;
Fig. 5 is the schematic diagram according to the second embodiment of the index document handling apparatus of the analytical database of the present invention;With And
Fig. 6 is the schematic diagram according to the 3rd embodiment of the index document handling apparatus of the analytical database of the present invention.
Embodiment
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is the flow chart according to the first embodiment of the index document handling method of the analytical database of the present invention.Such as Shown in Fig. 1, this method includes steps S101 to step S105:
Step S101, the achievement data in the first database is handled, wherein, when the first database saves one Between process cycle data and be stored in analytical database, the first database includes the first subregion, and the first subregion includes the One index file, achievement data are stored in the first index file.
Achievement data in first database is handled, i.e., according to the treatment conditions received, achievement data pressed Handled according to treatment conditions, the result obtained after treatment is stored in the first index file in the first subregion.
Analytical database is that can data be carried out with Online statistics, online data analysis, the Information Number of the excavation such as inquiry immediately It is one important branch of database product according to the work of value.
The fact that the first index file is exactly in analytical database table, the true each data warehouse of table editor include one Individual or multiple fact tables.Fact table may include business sales data, as cash registers affairs.Caused number According to fact table generally comprises substantial amounts of row.Fact table is mainly characterized by including numerical data, and these numerals Information can collect, and to provide units concerned as the data of history, each fact table includes one by some groups Into index, the index includes the major key of the correlation dimension table as external key, and dimension table includes the true characteristic recorded.Thing Real data table should not include descriptive information, should not also include except digital metric field and make it is true with it is right in dimension table Answer any data outside the relative index field of item." metric " included in fact table has two kinds:One kind is can With accumulative metric, another kind is non-accumulative metric.Most useful metric is the metric that can add up, and it adds up The numeral come is significantly.
In general, a fact table will be associated with one or more dimension tables, and user is utilizing true number When creating cube according to table, one or more dimension tables can be used.
Step S102, the second subregion is created in the second database, wherein, the second subregion is corresponding with the first subregion Subregion, the second database are the databases for storing all historical datas in analytical database.
Historical data base is to store historical data all in analytical database, according to first point in historical data base The strategy of area identical partitions carries out creating the second subregion.
Partitions of database is a kind of Physical database design technology, and it is a kind of very common operation to create partitions of database. Although partitioning technique can realize many effects, its main purpose is to reduce reading and writing data in specific SQL operations Total amount to reduce the response time.Subregion mainly has two kinds of forms:Horizontal partitioning, this form subregion are that the row of table is divided Area, combined by the data set of the physics column split inside such mode different grouping, so as to carry out individual segmentation or Collective is split.All being listed in each data set defined in table can be found, so the characteristic of table is still maintained.Lift Individual simple case:One table comprising 10 years invoice records can be partitioned ten different subregions, what each subregion included It is the record of wherein 1 year.In general vertical partitioning, this partitioned mode are to reduce target by the vertical division to table The width of table, some specific row are made to be divided into specific subregion, each subregion contains the row corresponding to row therein.
Step S103, the first index file is copied in the corresponding index file of the second subregion.
Achievement data in first database is handled, achievement data is stored in the first index file, by first Index file is copied in the corresponding index file of the second subregion.
For example, according to the processing filter condition of reception, to being named as in the first database in the August index file of 1 day Achievement data is handled, and processing terminates, and it is the achievement data after having handled to be named as the August index file content of 1 day.Will It is named as the August index file of 1 day and is copied to corresponding in the second database be named as in the August index file of 1 day.
Step S104, the first index file is replaced to index file corresponding in the second subregion.
On the achievement data in the first database is handled, achievement data is stored in the first index file, by One index file is copied in the corresponding index file of the second subregion, the first index file is replaced corresponding in the second subregion Index file.
For example, according to the processing filter condition of reception, to being named as in the first database in the August index file of 1 day Achievement data is handled, and processing terminates, and it is the achievement data after having handled to be named as the August index file content of 1 day.Will It is also August 1 day that the August index file of 1 day is named as in first database and is copied to corresponding name in the second database In index file.And replace life corresponding in the second database by the August index file of 1 day is named as in the first database The entitled August index file of 1 day.
Step S105, metadata maintenance is carried out to the index file in the second database, updates the second database.
Metadata refers to caused relevant data source definitions, object definition, transformation rule during database establishment Deng the critical data of correlation.For metadata also comprising the business information on data implication, all these information all should be appropriate simultaneously It is kind to preserve, and manage well, the development and use for database provide convenient.Metadata is a kind of binary message, to The program for being stored in CLR Portable executable file (PE) or being stored in internal memory is described.By you When code compilation is PE files, metadata will be inserted into the part of this document, and be Microsoft by code conversion Intermediate language (MSIL) is simultaneously inserted it into another part of this document.Defined in module or procedure set and quote each Type and member will illustrate in the metadata.When performing code, metadata is loaded into internal memory by Runtime Library, and is drawn The information such as the class of pertinent code, member, succession are found with it.
First index file replaces index file corresponding in the second subregion, to the finger after being replaced in the second database Mark file and carry out metadata maintenance, update the second database.
For example, a kind of specific implementation step that metadata is safeguarded, changes info.x.xml, wherein, info.x.xml refers to Subregion meta data file is marked, replaces the full content of subregion meta data file.The meta data file of subregion meta file is changed, its In, meta data file represents the All Files stored in the subregion.Respective field in snapshot database is replaced data Version is modified as the versions of data in snapshot database, wherein, versions of data is used for, object version object corresponding with data files Version is constant, and object version is used for corresponding with the X object version in Info.X.xml.Change LastProcessed, After the change such as EstimatedSize information, LastProcessed, EstimatedSize, metadata information is more accurate.
A kind of index document handling method of the analytical database provided in embodiments of the invention, this method are used to the Achievement data in one database is handled;The second subregion is created in the second database;First index file is copied to In the corresponding index file of second subregion;First index file is replaced to index file corresponding in the second subregion;To Index file in two databases carries out metadata maintenance, updates the second database, solves analytical database and is carrying out dimension Or the resource of meeting Consumption Analysis database is synchronized while index processing, cause the synchronizing function that analytical database carries not The problem of stable, synchronizing function stabilization is reached and has expended the few effect of resource.
Fig. 2 is the flow chart according to the second embodiment of the index document handling method of the analytical database of the present invention.Such as Shown in Fig. 2, this method includes steps S201 to step S208:
Step S201, the achievement data in the first database is handled.
The step is the same as above-mentioned steps S101.
Step S202, the second subregion is created in the second database.
The step is the same as above-mentioned steps S102.
Step S203, the first index file is copied in the corresponding index file of the second subregion.
The step is the same as above-mentioned steps S103.
Step S204, the first index file is replaced to index file corresponding in the second subregion.
The step is the same as above-mentioned steps S104.
Step S205, metadata maintenance is carried out to the index file in the second database.
The step is the same as above-mentioned steps S105.
Step S206, separate the index file in the second database and the second database.
Specifically, Detach operations separate index file from analytical database.Example code:
<Detach xmlns=" http://schemas.microsoft.com/analysisservices/2003/ engine">
<Object>
<DatabaseID>WebDissectorAS_000217_Snapshot</DatabaseID>
</Object>
</Detach>
By this operation, index file is separated from analytical database.
Step S207, update the second database.
A kind of index document handling method of the analytical database provided in embodiments of the invention, this method are used to the Achievement data in one database is handled;The second subregion is created in the second database;First index file is copied to In the corresponding index file of second subregion;First index file is replaced to index file corresponding in the second subregion;To Index file in two databases carries out metadata maintenance, separates the index file in the second database and the second database, more New second database, the index file separated in the second database is loaded in the second database, is solved in analytical database After being replaced index file by duplication, fail the problem of updating, and has reached successfully analytical database is updated Effect.
Step S208, the index file separated in the second database is loaded in the second database.
Specifically, Attach operations load the index file of separation on analytical database.Example code:
<Attach xmlns=" http://schemas.microsoft.com/analysisservices/2003/ engine">
<Folder>C:\ProgramFiles\MicrosoftSQLServer\MSAS11.MSSQLSERVER\OLAP\ Dat a\WebDissectorAS_000217_Snapshot.0.db\</Folder>
<ReadWriteModexmlns=" http://schemas.microsoft.com/analysisservices/ 2008/engine/100">ReadWrite</ReadWriteMode>
</Attach>
Operated by this, the index file of separation is loaded in analytical database.After Detach operations being carried out to database Again after Attach operations, analytical database is refreshed master.vmp main metadata files, store the overall situation of all objects only The information such as one identification number and version number, can be to carry out data query after refresh.
Fig. 3 is the flow chart according to the second embodiment of the index document handling method of the analytical database of the present invention.Such as Shown in Fig. 3, this method includes steps S301 to step S310:
Step S301, the achievement data in the first database is handled.
The step is the same as above-mentioned steps S101.
Step S302, the second subregion is created in the second database.
The step is the same as above-mentioned steps S102.
Step S303, the first index file is copied in the corresponding index file of the second subregion.
The step is the same as above-mentioned steps S103.
Step S304, the first index file is replaced to index file corresponding in the second subregion.
The step is the same as above-mentioned steps S104.
Step S305, metadata maintenance is carried out to the index file in the second database, updates the second database.
The step is the same as above-mentioned steps S105.
Step S306, data query is carried out in the second database.
Step S307, judges whether data query process reports an error.
Step S308, in the case where data query process reports an error, it is relative that the first index file is copied to the second subregion In the index file answered.
Second database receives data query instruction, performs data query, if in query process, if there is inquiry Situation about reporting an error, the first index file in the first database is copied in the corresponding index file of the second subregion.
Step S309, the first index file is replaced to index file corresponding in the second subregion.
Second database receives data query instruction, performs data query, if in query process, if there is inquiry Situation about reporting an error, the first index file in the first database is copied in the corresponding index file of the second subregion.And by The first index file replaces index file corresponding in the second subregion in one database.
Step S310, metadata maintenance is carried out to the index file in the second database, updates the second database.
The step is the same as above-mentioned steps S105.
A kind of index document handling method of the analytical database provided in embodiments of the invention, this method are used to the Achievement data in one database is handled;The second subregion is created in the second database;First index file is copied to In the corresponding index file of second subregion;First index file is replaced to index file corresponding in the second subregion;To Index file in two databases carries out metadata maintenance, updates the second database, data query is carried out in the second database; Judge whether data query process reports an error;In the case where data query process reports an error, the first index file is copied to second In the corresponding index file of subregion;First index file is replaced to index file corresponding in the second subregion;Counted to second Metadata maintenance is carried out according to the index file in storehouse, the second database is updated, solves analytical database and entering row index file Replicate and replace and after metadata maintenance, not the problem of synchronous success, reached a kind of new synchronization side for ensureing analytical database Method can synchronously succeed and can ensure the effect of data query stable performance.
It should be noted that can be in such as one group of computer executable instructions the flow of accompanying drawing illustrates the step of Performed in computer system, although also, show logical order in flow charts, in some cases, can be with not The order being same as herein performs shown or described step.
Fig. 4 is the schematic diagram according to the first embodiment of the index document handling apparatus of the analytical database of the present invention.Such as Shown in Fig. 4, the index document handling apparatus of the analytical database includes:Processing unit 10, creating unit 20, copied cells 30, The updating block 50 of replacement unit 40 and first.
Processing unit 10, for handling the achievement data in the first database, wherein, the first database saves The data in one time-triggered protocol cycle and it is stored in analytical database, the first database includes the first subregion, the first subregion Including the first index file, achievement data is stored in the first index file.
Creating unit 20, for creating the second subregion in the second database, wherein, the second subregion is phase with the first subregion Corresponding subregion, the second database are the databases for storing all historical datas in analytical database.
Copied cells 30, for the first index file to be copied in the corresponding index file of the second subregion.
Replacement unit 40, for the first index file to be replaced to index file corresponding in the second subregion.
First updating block 50, for carrying out metadata maintenance, the number of renewal second to the index file in the second database According to storehouse.
A kind of index document handling apparatus of the analytical database provided in embodiments of the invention, the device processing unit 10 are used to handle the achievement data in the first database;Creating unit 20 is used to create second point in the second database The database of area second is the database for storing all historical datas in analytical database;Copied cells 30 is used for the first index text Part is copied in the corresponding index file of the second subregion;Replacement unit 40 is used to replace the first index file in the second subregion Corresponding index file;First updating block 50 is used to carry out metadata maintenance to the index file in the second database, more New second database, solve analytical database and meeting Consumption Analysis data are synchronized while dimension is carried out or index is handled The resource in storehouse, the problem of synchronizing function for causing analytical database to carry is unstable, it is stable and expend synchronizing function is reached The few effect of resource.
Fig. 5 is the schematic diagram according to the first embodiment of the index document handling apparatus of the analytical database of the present invention.Such as Shown in Fig. 5, the index document handling apparatus of the analytical database includes:Processing unit 10, creating unit 20, copied cells 30, The updating block 50 of replacement unit 40 and first.First updating block 50 also includes:Separation module 501, the and of the first update module 502 Load-on module 503.
Processing unit 10, creating unit 20, copied cells 30, the updating block 50 of replacement unit 40 and first effect with it is upper State and act on identical in embodiment, will not be repeated here.
Separation module 501, for separating the index file in the second database and the second database.
First update module 502, for updating the second database.
Load-on module 503, for loading the index file separated in the second database in the second database.
A kind of index document handling apparatus of the analytical database provided in embodiments of the invention, the device processing unit 10 are used to handle the achievement data in the first database;Creating unit 20 is used to create second point in the second database The database of area second is the database for storing all historical datas in analytical database;Copied cells 30 is used for the first index text Part is copied in the corresponding index file of the second subregion;Replacement unit 40 is used to replace the first index file in the second subregion Corresponding index file;First updating block 50 is used to carry out metadata maintenance to the index file in the second database, more New second database, separation module 501 are used to separate the index file in the second database and the second database, the first renewal mould Block 502 is used to update the second database, and load-on module 503 is used to load the finger separated in the second database in the second database File is marked, solve analytical database and meeting Consumption Analysis database is synchronized while dimension is carried out or index is handled Resource, the problem of synchronizing function for causing analytical database to carry is unstable, solve in analytical database by replicate by for After changing index file, fail the problem of updating, and has reached the effect being successfully updated to analytical database.
Fig. 6 is the schematic diagram according to the first embodiment of the index document handling apparatus of the analytical database of the present invention.Such as Shown in Fig. 6, the index document handling apparatus of the analytical database includes:Processing unit 10, creating unit 20, copied cells 30, Replacement unit 40, the first updating block 50, query unit 60, judging unit 70, copied cells 80, replacement unit 90 and second are more New unit 100.
Processing unit 10, creating unit 20, copied cells 30, the updating block 50 of replacement unit 40 and first effect with it is upper State and act on identical in embodiment, will not be repeated here.
Query unit 60, for carrying out data query in the second database.
Judging unit 70, for judging whether data query process reports an error.
Copied cells 80, in the case of being reported an error in data query process, the first index file is copied to second point In the corresponding index file in area.
Replacement unit 90, for the first index file to be replaced to index file corresponding in the second subregion.
Second updating block 100, for carrying out metadata maintenance, the number of renewal second to the index file in the second database According to storehouse.
A kind of index document handling apparatus of the analytical database provided in embodiments of the invention, the device processing unit 10 are used to handle the achievement data in the first database;Creating unit 20 is used to create second point in the second database The database of area second is the database for storing all historical datas in analytical database;Copied cells 30 is used for the first index text Part is copied in the corresponding index file of the second subregion;Replacement unit 40 is used to replace the first index file in the second subregion Corresponding index file;First updating block 50 is used to carry out the index file in the second database metadata maintenance renewal Second database;Query unit 60 is used for carrying out data query in the second database;Judging unit 70 is used to judge that data are looked into Whether inquiry process reports an error;Copied cells 80 is used to the first index file is copied into the in the case where data query process reports an error In the corresponding index file of two subregions;Replacement unit 90 is used to replacing the first index file into finger corresponding in the second subregion Mark file;Second updating block 100 is used to carry out metadata maintenance to the index file in the second database, updates the second data Storehouse, solve analytical database after entering row index file and replicating replacement and metadata maintenance, not the problem of synchronous success, reach The new analytical database synchronous method of guarantee can synchronously succeed and can ensure the effect of data query stable performance.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored Performed in the storage device by computing device, either they are fabricated to respectively each integrated circuit modules or by they In multiple modules or step be fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific Hardware and software combines.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (10)

  1. A kind of 1. index document handling method of analytical database, it is characterised in that including:
    Achievement data in first database is handled, wherein, first database saves a time-triggered protocol week The data of phase and it is stored in analytical database, first database includes the first subregion, and first subregion includes the One index file, the achievement data are stored in the first index file;
    The second subregion is created in the second database, wherein, second subregion is corresponding subregion with first subregion, Second database is the database for storing all historical datas in analytical database;
    The first index file is copied in index file corresponding in second subregion;
    The first index file is replaced to index file corresponding in second subregion;And
    Metadata maintenance is carried out to the index file in second database, updates second database;
    Wherein, the first index file includes the tables of data of the fact that in the analytical database.
  2. 2. according to the method for claim 1, it is characterised in that first number is carried out to the index file in second database According to maintenance, updating second database also includes:
    Separate second database and the index file in second database;
    Update second database;And
    The index file separated in second database is loaded in second database.
  3. 3. according to the method for claim 1, it is characterised in that first number is carried out to the index file in second database According to maintenance, updating second database includes:
    Change the filename that the second subregion in second database corresponds to file in index file;
    Update the second subregion in second database and correspond to lists of documents in index file, wherein, the lists of documents are The filename of all index files in the subregion of the second database second is counted;
    The versions of data of second database is changed to the versions of data of first database;And
    Update second database.
  4. 4. according to the method for claim 1, it is characterised in that first number is carried out to the index file in second database According to maintenance, updating second database includes:
    Obtain the version information of index file corresponding in second database;
    Change the version information of index file corresponding in second database;And
    Update second database.
  5. 5. according to the method for claim 1, it is characterised in that also include after renewal second database:
    Data query is carried out in second database;
    Judge whether the data query process reports an error;
    In the case where the data query process reports an error, it is corresponding that the first index file is copied to second subregion Index file in;
    The first index file is replaced to index file corresponding in second subregion;And
    Metadata maintenance is carried out to the index file in second database, updates second database.
  6. A kind of 6. index document handling apparatus of analytical database, it is characterised in that including:
    Processing unit, for handling the achievement data in the first database, wherein, first database saves one The data in individual time-triggered protocol cycle and it is stored in analytical database, first database includes the first subregion, and described One subregion includes the first index file, and the achievement data is stored in the first index file;
    Creating unit, for creating the second subregion in the second database, wherein, second subregion is with first subregion Corresponding subregion, second database are the databases for storing all historical datas in analytical database;
    Copied cells, for the first index file to be copied in the corresponding index file of second subregion;
    Replacement unit, for the first index file to be replaced to index file corresponding in second subregion;And
    First updating block, for carrying out metadata maintenance, renewal described second to the index file in second database Database;
    Wherein, the first index file includes the tables of data of the fact that in the analytical database.
  7. 7. device according to claim 6, it is characterised in that the first updating block includes:
    Separation module, for separating second database and the index file in second database;
    First update module, for updating second database;And
    Load-on module, for loading the index file separated in second database in second database.
  8. 8. device according to claim 6, it is characterised in that the first updating block includes:
    Modified module, the filename of file in index file is corresponded to for changing the second subregion in second database;
    Second update module, lists of documents in index file are corresponded to for updating the second subregion in second database, its In, the lists of documents are the filenames for having counted all index files in the subregion of the second database second;
    Module is changed, for the versions of data of second database to be changed to the versions of data of first database;With And
    3rd update module, for updating second database.
  9. 9. device according to claim 6, it is characterised in that the first updating block includes:
    Acquisition module, for obtaining the version information of index file corresponding in second database;
    Modified module, for changing the version information of index file corresponding in second database;And
    4th update module, for updating second database.
  10. 10. device according to claim 6, it is characterised in that also include after the first updating block:
    Query unit, for carrying out data query in second database;
    Judging unit, for judging whether the data query process reports an error;
    Copied cells, in the case of being reported an error in the data query process, the first index file is copied to described In the corresponding index file of second subregion;
    Replacement unit, for the first index file to be replaced to index file corresponding in second subregion;And
    Second updating block, for carrying out metadata maintenance, renewal described second to the index file in second database Database.
CN201410453740.0A 2014-09-05 2014-09-05 The index document handling method and device of analytical database Active CN104166739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410453740.0A CN104166739B (en) 2014-09-05 2014-09-05 The index document handling method and device of analytical database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410453740.0A CN104166739B (en) 2014-09-05 2014-09-05 The index document handling method and device of analytical database

Publications (2)

Publication Number Publication Date
CN104166739A CN104166739A (en) 2014-11-26
CN104166739B true CN104166739B (en) 2017-12-19

Family

ID=51910552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410453740.0A Active CN104166739B (en) 2014-09-05 2014-09-05 The index document handling method and device of analytical database

Country Status (1)

Country Link
CN (1) CN104166739B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484398B (en) * 2014-12-12 2018-02-02 北京国双科技有限公司 Data aggregation method and device in tables of data
CN109214640B (en) * 2018-07-02 2022-10-11 土巴兔集团股份有限公司 Method and device for determining index result and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495862A (en) * 2011-11-24 2012-06-13 神华集团有限责任公司 Data integrating method and system for coal liquefying device
CN102902812A (en) * 2012-10-22 2013-01-30 飞天诚信科技股份有限公司 Method for realizing remote synchronization of database
CN103139311A (en) * 2013-03-07 2013-06-05 珠海金山办公软件有限公司 System, device and method of file sharing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495862A (en) * 2011-11-24 2012-06-13 神华集团有限责任公司 Data integrating method and system for coal liquefying device
CN102902812A (en) * 2012-10-22 2013-01-30 飞天诚信科技股份有限公司 Method for realizing remote synchronization of database
CN103139311A (en) * 2013-03-07 2013-06-05 珠海金山办公软件有限公司 System, device and method of file sharing

Also Published As

Publication number Publication date
CN104166739A (en) 2014-11-26

Similar Documents

Publication Publication Date Title
US7933932B2 (en) Statistics based database population
Sumbaly et al. The big data ecosystem at linkedin
Silva et al. SQL: From traditional databases to big data
US20180025024A1 (en) Pluggable storage system for parallel query engines
US9372882B2 (en) Partitioning online databases
US10180992B2 (en) Atomic updating of graph database index structures
Lightstone et al. Physical Database Design: the database professional's guide to exploiting indexes, views, storage, and more
CN102521225B (en) Incremental data extraction device and incremental data extraction method
CN102651008B (en) Method and equipment for organizing data records in relational data base
CA3176450A1 (en) Method and apparatus for implementing incremental data consistency
CN107408114B (en) Identifying join relationships based on transactional access patterns
US8626729B2 (en) Database index monitoring system
US20170255708A1 (en) Index structures for graph databases
US9633095B2 (en) Extract, transform and load (ETL) system and method
CN103853802B (en) Device and method for indexing digital content
CN103778133A (en) Database object changing method and device
McKnight Information management: strategies for gaining a competitive advantage with data
CN104111936A (en) Method and system for querying data
CN102779138A (en) Hard disk access method of real time data
CN103077192B (en) A kind of data processing method and system thereof
CN105787058A (en) User label system and data pushing system based on same
CN104166739B (en) The index document handling method and device of analytical database
US10877998B2 (en) Highly atomized segmented and interrogatable data systems (HASIDS)
CN103809915B (en) The reading/writing method of a kind of disk file and device
CN114860727A (en) Zipper watch updating 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
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Index file processing method and device for analysis database

Effective date of registration: 20190531

Granted publication date: 20171219

Pledgee: Shenzhen Black Horse World Investment Consulting Co., Ltd.

Pledgor: Beijing Guoshuang Technology Co.,Ltd.

Registration number: 2019990000503

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Patentee after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Patentee before: Beijing Guoshuang Technology Co.,Ltd.