CN102521401B - Method and device for processing data view - Google Patents

Method and device for processing data view Download PDF

Info

Publication number
CN102521401B
CN102521401B CN201110440007.1A CN201110440007A CN102521401B CN 102521401 B CN102521401 B CN 102521401B CN 201110440007 A CN201110440007 A CN 201110440007A CN 102521401 B CN102521401 B CN 102521401B
Authority
CN
China
Prior art keywords
view
relationship
version identifier
default
object relationship
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
CN201110440007.1A
Other languages
Chinese (zh)
Other versions
CN102521401A (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.)
Caxa Technology Co Ltd
Original Assignee
Caxa 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 Caxa Technology Co Ltd filed Critical Caxa Technology Co Ltd
Priority to CN201110440007.1A priority Critical patent/CN102521401B/en
Publication of CN102521401A publication Critical patent/CN102521401A/en
Application granted granted Critical
Publication of CN102521401B publication Critical patent/CN102521401B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention discloses a method and a device for processing a data view. The method comprises the following steps of: creating one or more view types for the data view according to needs, wherein the view types comprise any one or more objects and object relations in an object relation diagram of the data view; creating corresponding view versions for the one or more view types; acquiring view version identifiers of the view versions, wherein the view versions represent view types at specific moments; and inserting the view version identifiers into one or more object-relational tables to obtain the object relation diagram with the view version identifiers. By the method and the device, the efficiency of operation over a database can be improved, and the error rate of each operating function can be decreased.

Description

The disposal route of Data View and device
Technical field
The present invention relates to computer realm, in particular to a kind of disposal route and device of Data View.
Background technology
In data management system, the main body using object as data conventionally, the relational network that the incidence relation between object and object forms with regard to abstract for Data View.The Data View that multiple objects form can change along with the variation of relation between the increase of object, deletion or object.
In many practical application, object set up after, conventionally do not change, variation be mainly the relation between object.Like this, the variation of Data View is not mainly the variation of object relationship in the same time.The storage mode of existing Object table and object relationship table is respectively as shown in following table 1 and table 2:
Table 1: table 2:
Under current many application scenarioss, can carry out various operations to Data View, for example, often need to restore the data to certain particular historical moment, in fact namely return to the Data View of certain particular moment, this also just needs the Data View in certain particular historical moment to be preserved, and can carry out the reduction of historical data according to the Data View of preserving.
In existing Data View, due between object by relation link together composition Data View, therefore when between object be related to change time, Data View is change also.The backup and recovery function of carrying out based on the Data View in current data management system, can adopt at the time point that may need restoring data, the data of current use are backed up, and in needs, the data that recall certain time point conduct interviews.The mode of this Backup Data just there will be in the situation that needs frequently reduce historical data, is not suitable for lightweight, and the data backup and resume of big data quantity often need to reduce the application of historical data view.
In existing Data View, need at present to carry out the various operations between object and object relationship frequently for correlation technique, cause the inefficiency of database in the time that mass data changes, the easy problem of makeing mistakes, not yet propose at present effective solution.
Summary of the invention
In existing Data View, need to carry out the various operations between object and object relationship frequently for correlation technique, cause the inefficiency of database in the time that mass data changes, the easy problem of makeing mistakes, not yet propose effective problem at present and propose the present invention, for this reason, fundamental purpose of the present invention is to provide a kind of disposal route and device of Data View, to address the above problem.
To achieve these goals, according to an aspect of the present invention, a kind of disposal route of Data View is provided, the method comprises: create according to demand one or more view types of Data View, view type comprises any one or more objects and the object relationship in the object relationship figure of Data View; For one or more view types create corresponding view version; Obtain the view version identifier of view version, wherein, view version characterizes the view type of predetermined instant; View version identifier is inserted in one or more object relationship tables, to obtain the object relationship figure with view version identifier.
Further, view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, method also comprises: steps A 1, in object relationship figure, obtain the one or more object relationships taking the first default object as starting point; Step B1, in the situation that the corresponding view type of object relationship meets backup requirements, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the first default object are saved as to view relation; Step C1, the one or more object relationships that are starting point by the first default object are obtained the related object of the first default object, and according to the related object circulation execution step A1 and the B1 that obtain, until obtain all view relations to obtain Backup Data view.
Further, view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, method also comprises: steps A 2, in object relationship figure, obtain the one or more object relationships taking the second default object as starting point; Step B2, in the situation that the corresponding view type of object relationship meets reduction demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the second default object are copied, to obtain the view relation that needs reduction; Step C2, the one or more object relationships that are starting point by the second default object are obtained the related object of the second default object, and according to the related object circulation execution step A2 and the B2 that obtain, obtain all view relations of reduction that need to obtain restoring data view until copy.
Further, view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, method also comprises: steps A 3, in object relationship figure, obtain the one or more object relationships taking the 3rd default object as starting point; Step B3, in the situation that the corresponding view type of object relationship meets deletion demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the 3rd default object are deleted as view relation; Step C3, the one or more object relationships that are starting point by the 3rd default object are obtained the related object of the 3rd default object, and according to the related object circulation execution step A3 and the B3 that obtain, until obtain and delete all view relations.
Further, view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, method also comprises: steps A 4, in object relationship figure, obtain the one or more object relationships taking the 4th default object as starting point; Step B4, meet check demand in the situation that at the corresponding view type of object relationship, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the 4th default object are shown as view relation; Step C4, the one or more object relationships that are starting point by the 4th default object are obtained the related object of the 4th default object, and according to the related object circulation execution step A4 and the B4 that obtain, until obtain and show all view relations.
To achieve these goals, according to a further aspect in the invention, a kind for the treatment of apparatus of Data View is provided, this device comprises: the first creation module, for creating according to demand one or more view types of Data View, view type comprises any one or more objects and the object relationship in the object relationship figure of Data View; The second creation module, is used to one or more view types to create corresponding view version; Acquisition module, for obtaining the view version identifier of view version, wherein, view version characterizes the view type of predetermined instant; Insert module, for view version identifier being inserted to one or more object relationship tables, to obtain the object relationship figure with view version identifier.
Further, device also comprises: backup module, be used at object relationship figure, obtain the one or more object relationships taking the first default object as starting point, in the situation that the corresponding view type of object relationship meets backup requirements, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the first default object are saved as to view relation; The one or more object relationships that are starting point by the first default object are obtained the related object of the first default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain all view relations to obtain Backup Data view.
Further, device also comprises: roll-back module, at object relationship figure, obtain the one or more object relationships taking the second default object as starting point; In the situation that the corresponding view type of object relationship meets reduction demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the second default object are copied, to obtain the view relation that needs reduction; The one or more object relationships that are starting point by the second default object are obtained the related object of the second default object, and carry out above-mentioned two steps according to the related object circulation obtaining, obtain all view relations of reduction that need to obtain restoring data view until copy.
Further, device also comprises: removing module, at object relationship figure, obtains the one or more object relationships taking the 3rd default object as starting point; In the situation that the corresponding view type of object relationship meets deletion demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the 3rd default object are deleted as view relation; The one or more object relationships that are starting point by the 3rd default object are obtained the related object of the 3rd default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain and delete all view relations.
Further, device also comprises: check module, at object relationship figure, obtain the one or more object relationships taking the 4th default object as starting point; Meet check demand in the situation that at the corresponding view type of object relationship, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the 4th default object are shown as view relation; The one or more object relationships that are starting point by the 4th default object are obtained the related object of the 4th default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain and show all view relations.
By the present invention, adopt and create according to demand one or more view types of Data View, view type comprises any one or more objects and the object relationship in the object relationship figure of Data View; For one or more view types create corresponding view version; Obtain the view version identifier of view version, wherein, view version characterizes the view type of predetermined instant; View version identifier is inserted in one or more object relationship tables, to obtain the object relationship figure with view version identifier, what solved related art needs to carry out the various operations between object and object relationship frequently in existing Data View, cause the inefficiency of database in the time that mass data changes, the easy problem of makeing mistakes, and then realize the efficiency that improves the each generic operation of database, reduce the effect of the error rate of operations function.
Brief description of the drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the application's a part, and schematic description and description of the present invention is used for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is according to the structural representation of the treating apparatus of the Data View of the embodiment of the present invention;
Fig. 2-3rd, according to the relational network configuration structure schematic diagram between object type and object type embodiment illustrated in fig. 1;
Fig. 4 is according to the process flow diagram of the disposal route of the Data View of the embodiment of the present invention.
Embodiment
It should be noted that, in the situation that not conflicting, the feature in embodiment and embodiment in the application can combine mutually.Describe below with reference to the accompanying drawings and in conjunction with the embodiments the present invention in detail.
Fig. 1 is according to the structural representation of the treating apparatus of the Data View of the embodiment of the present invention; Fig. 2-3rd, according to the relational network configuration structure schematic diagram between object type and object type embodiment illustrated in fig. 1.
As shown in Figure 1, the treating apparatus of this Data View comprises: the first creation module 10, for creating according to demand one or more view types of Data View, view type comprises any one or more objects and the object relationship in the object relationship figure of Data View; The second creation module 30, is used to one or more view types to create corresponding view version; Acquisition module 50, for obtaining the figure version identifier of view version, wherein, view version characterizes the view type of predetermined instant; Insert module 70, for view version identifier being inserted to one or more object relationship tables, to obtain the object relationship figure with view version identifier.
The above embodiments of the present application are by carrying out the division of type to Data View according to the feature between object relationship, obtain multiple view type, each view type characterizes in a Data View has same alike result object relationship, these have same alike result object relationship and also form a Data View, belong to abstract a part of Data View out in former Data View, and each object relationship corresponding its corresponding view type, set up the view version identifier that each view type is corresponding simultaneously, and the view version identifier obtaining is increased in object relationship table, simul relation table increases view properties, storage and the access of Data View are realized.So, the application's focus is the relation between object, to the abstract object relationship obtaining according to demand, the view relation obtaining carries out each generic operation, in existing Data View, need to carry out the various operations between object and object relationship frequently thereby solved, cause the inefficiency of database in the time that mass data changes, the easy problem of makeing mistakes, and then realize the efficiency that improves the each generic operation of database, reduce the error rate of operations function.For example, as long as in the view relation preserving, guarantee is related to that the object of association is not deleted, just can carry out by historical data view and reduce the function of historical data.
Concrete, the object relationship table in the application is as shown in the structure of following table 3:
Table 3:
Relation identity ID REL_ID
The ID of object A OBJ_ID_A
The ID of object B OBJ_ID_B
View version identifier ID VIEW_OBJ_ID
Attribute of a relation
Object relationship table shown in table 3, is used for depositing the mutual relationship between object, wherein, is related to the object on both sides, becomes object A and object B.If when view version identifier equals zero, represent the current relation using, in the time of view version identifier non-zero, refer to the relation of certain Data View.
Concrete, the view type table in the application is as shown in table 4 below, and this view type table is used for the dissimilar view of conservation object.
Table 4:
View type mark OBJ_ID
View affiliated partner mark ENTRY_OBJ_ID
View name VIEW_NAME
View type VIEW_TYPE
View type attribute
Concrete, the view version table in the application is as shown in table 5 below, is used for the different editions of object same type view.
Table 5:
View version identifier OBJ_ID
View affiliated partner mark ENTRY_OBJ_ID
View name VIEW_NAME
View type VIEW_TYPE
View type attribute
The relation of above-mentioned view type table and view version table is with object relationship table.
Can specifically describe a point implementation process for invention in conjunction with the embodiment shown in Fig. 2-3.
As shown in Figure 2, this Data View forms object relationship network by the object type of object A, B, C, D, E and relation each other thereof.
On the basis of Fig. 2, carry out view type configuration, and set up as required view type, view type refers to according to demand out abstract the relation between the part object in object relationship network and object, the one group of Data View obtaining.As shown in Figure 3 in an object relationship network, can comprise the corresponding relational network of multiple view types: for category-A object, belong to the view of two types: view I and view II.Concrete, first create view type and view version, for example, if object has the view of this type, create the redaction of this view type, and obtain view version identifier; If no, first create view type, then set up first view version of the type view, and obtain view version identifier.From above-described embodiment, the Data View that the application creates has done further type according to type and has divided, and carry out abstract according to data type to Data View, obtain the new data view creating by demand, in the time that system is carried out in a large number various operation frequently to database, what only pay close attention to is the relation between object, and the abstract object relationship that obtains is according to demand carried out to each generic operation, improve the efficiency of the each generic operation of database, reduce the error rate of operations function.
The device of the above embodiments of the present application can also comprise: backup module 901, be used at object relationship figure, obtain the one or more object relationships taking the first default object as starting point, in the situation that the corresponding view type of object relationship meets backup requirements, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the first default object are saved as to view relation; The one or more object relationships that are starting point by the first default object are obtained the related object of the first default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain all view relations to obtain Backup Data view.
In conjunction with the embodiment shown in Fig. 2-3, the above-mentioned backup module 901 of the application is realized by view device and is created new Data View, realizes the backup of data.Concrete, create in the process of view, first, according to object relationship figure, taking the object type that need to create view as starting point, search for its incidence relation, if on its incidence relation, be attached with corresponding view type, the object relationship table of this object of actual access, obtain relevant to instance objects institute relevant, according to view version identifier by the relevant view relation that saves as obtaining; Then,, according to view relation, obtain all relevant objects, on object relationship figure, search for its correlationship, if its relation institute corresponding corresponding view, actual access object relationship table, obtain all view relations relevant to object, and preserve all view relations.So repeat, until related institute view relation is all preserved, finally obtain the Data View of backup.
The device of the above embodiments of the present application can also comprise: roll-back module 902, at object relationship figure, obtain the one or more object relationships taking the second default object as starting point; In the situation that the corresponding view type of object relationship meets reduction demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the second default object are copied, to obtain the view relation that needs reduction; The one or more object relationships that are starting point by the second default object are obtained the related object of the second default object, and carry out above-mentioned two steps according to the related object circulation obtaining, obtain all view relations of reduction that need to obtain restoring data view until copy.
In conjunction with the embodiment shown in Fig. 2-3, the above embodiments of the present application are determined object by roll-back module 902 and are wanted the view version of rollback, thereby recover to need the relational view of reduction.Concrete, first determine object, and determine the corresponding view version of wanting rollback object; Then, according to object relationship figure, to need the object type of rollback view as starting point, search for its incidence relation, if on its incidence relation, be attached with corresponding view type, this object relationship table of actual access, obtain all view relations relevant to instance objects given view, and to copy these view relations be current data relation; Finally, according to object relationship, obtain all relevant objects, on object relationship figure, search for its correlationship, if its relation institute corresponding corresponding view, actual access relation table, obtain and all view relations of the relevant given view of object, and to copy these view relations be current data relation.So repeat, until related institute view relation is all copied, thereby realize the historical data view of certain particular point in time of rollback, realize the reduction of historical data.
The device of the above embodiments of the present application can also comprise: removing module 903, at object relationship figure, obtains the one or more object relationships taking the 3rd default object as starting point; In the situation that the corresponding view type of object relationship meets deletion demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the 3rd default object are deleted as view relation; The one or more object relationships that are starting point by the 3rd default object are obtained the related object of the 3rd default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain and delete all view relations.
In conjunction with the embodiment shown in Fig. 2-3, the above embodiments of the present application are determined the view version that need to delete object and will delete by removing module 903.Concrete, first, determine object, and determine the corresponding view version that will delete object; Then according to object relationship figure, taking the object type that need to delete view as starting point, search for its incidence relation, if on its incidence relation, be attached with corresponding view type, this object relationship table of actual access, obtains all view relations relevant to instance objects given view, and deletes these view relations; Then,, according to relation, obtain all relevant objects, on object relationship figure, search for its correlationship, if its relation institute corresponding corresponding view, actual access object relationship table, obtains and all relations of the relevant given view of object, deletes view relation.So repeat, until related institute view relation is all deleted.
The device of the above embodiments of the present application can also comprise: check module 904, at object relationship figure, obtain the one or more object relationships taking the 4th default object as starting point; Meet check demand in the situation that at the corresponding view type of object relationship, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the 4th default object are shown as view relation; The one or more object relationships that are starting point by the 4th default object are obtained the related object of the 4th default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain and show all view relations.
In conjunction with the embodiment shown in Fig. 2-3, the application is above-mentioned checks that module 904 is according to object relationship institute respective view type in Data View, while realizing view access, to the search of object network.Concrete, first, determine object, and determine and will delete the corresponding view version of object; Then, according to object relationship figure, taking the object type that need to check view as starting point, search for its incidence relation, if on its incidence relation, be attached with corresponding view type, this object relationship table of actual access, obtain all object relationships relevant to instance objects given view, these object relationships are shown as view relation, show view relation and relationship object; Finally, according to relation, obtain all relevant objects, on object relationship figure, search for its correlationship, if its relation institute corresponding corresponding view, actual access object relationship table, obtains and all relations of the relevant given view of object, shows these relations and relationship object.So repeat, until related institute view relation is all shown.
Fig. 4 is according to the process flow diagram of the disposal route of the Data View of the embodiment of the present invention.
Embodiment in conjunction with Fig. 2-3 is known, and method as shown in Figure 4 can comprise the steps:
Step S102, realizes by the first creation module 10 shown in Fig. 1 the one or more view types that create according to demand Data View, and view type comprises on any one or more objects and object relationship in the object relationship figure of Data View.
Step S104, is embodied as one or more view types by the second creation module 30 shown in Fig. 1 and creates corresponding view version.In this step, specifically can select some or multiple view types to create corresponding view version according to operational requirements.
Step S106, obtains the view version identifier of view version by the acquisition module 50 shown in Fig. 1, wherein, view version characterizes the view type of predetermined instant.
Step S108, is realized view version identifier is inserted in one or more object relationship tables by the insert module 70 shown in Fig. 1, to obtain the object relationship figure with view version identifier.
The above embodiments of the present application are by carrying out the division of type to Data View according to the feature between object relationship, obtain multiple view type, each view type characterizes in a Data View has same alike result object relationship, these have same alike result object relationship and also form a Data View, belong to abstract a part of Data View out in former Data View, and each object relationship corresponding its corresponding view type, set up the view version identifier that each view type is corresponding simultaneously, and the view version identifier obtaining is increased in object relationship table, simul relation table increases view properties, storage and the access of Data View are realized.So, the application's focus is the relation between object, to the abstract object relationship obtaining according to demand, the view relation obtaining carries out each generic operation, in existing Data View, need to carry out the various operations between object and object relationship frequently thereby solved, cause the inefficiency of database in the time that mass data changes, the easy problem of makeing mistakes, and then realize the efficiency that improves the each generic operation of database, reduce the error rate of operations function.For example, as long as in the view relation preserving, guarantee is related to that the object of association is not deleted, just can carry out by historical data and attempt to reduce the function of historical data.In the above embodiments of the present application, view version identifier being inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, method can also comprise the steps:
Steps A 1, in object relationship figure, obtains the one or more object relationships taking the first default object as starting point.This step realizes according to object relationship figure, taking the object type that need to create view as starting point, searches for its incidence relation.
Step B1, in the situation that the corresponding view type of object relationship meets backup requirements, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the first default object are saved as to view relation.If this step realizes on its incidence relation, be attached with corresponding view type, this object relationship table of actual access, obtains all object relationships relevant to instance objects, and according to view version identifier, all object relationships is saved as to view relation.
Step C1, the one or more object relationships that are starting point by the first default object are obtained the related object of the first default object, and according to the related object circulation execution step A1 and the B1 that obtain, until obtain all view relations to obtain Backup Data view.This step realizes according to relation, obtains all relevant objects, on object relationship figure, searches for its correlationship, if its relation institute corresponding corresponding view, actual access relation table, obtains all view relations relevant to object, and preserves view relation.So repeat, until related relation is all preserved.
Above-described embodiment creates new view by view device, realizes the backup of data
In the above embodiments of the present application, view version identifier being inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, method can also comprise:
Steps A 2, in object relationship figure, obtains the one or more object relationships taking the second default object as starting point.First this step has determined object, and determines the corresponding view version of wanting rollback object.
Step B2, in the situation that the corresponding view type of object relationship meets reduction demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the second default object are copied, to obtain the view relation that needs reduction.This step realizes according to object relationship figure, to need the object type of rollback view as starting point, search for its incidence relation, if on its incidence relation, be attached with corresponding view type, this relation table of actual access, obtains all object relationships relevant to instance objects given view, and to copy these object relationships be current data relation.
Step C2, the one or more object relationships that are starting point by the second default object are obtained the related object of the second default object, and according to the related object circulation execution step A2 and the B2 that obtain, obtain all view relations of reduction that need to obtain restoring data view until copy.This step realizes according to relation, obtain all relevant objects, on object relationship figure, search for its correlationship, if its relation institute is corresponding corresponding view, actual access object relationship table, obtains and all view relations of the relevant given view of object, and to copy these view relations be current data relation.So repeat, until related view relation all copies.There is above-mentioned steps to realize the historical data view of certain particular point in time of rollback, realize the reduction of historical data.
In the above embodiments of the present application, view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, method also comprises:
Steps A 3, in object relationship figure, obtains the one or more object relationships taking the 3rd default object as starting point.This step realizes determines object, and determines and will delete the corresponding view version of object.
Step B3, in the situation that the corresponding view type of object relationship meets deletion demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the 3rd default object are deleted as view relation.This step realizes according to object relationship figure, taking the object type that need to delete view as starting point, search for its incidence relation, if on its incidence relation, be attached with corresponding view type, this object relationship table of actual access, obtains all view relations relevant to instance objects given view, and deletes these view relations.
Step C3, the one or more object relationships that are starting point by the 3rd default object are obtained the related object of the 3rd default object, and according to the related object circulation execution step A3 and the B3 that obtain, until obtain and delete all view relations.This step realizes according to objects association, obtain all relevant objects, on object relationship figure, search for its correlationship, if its relation institute is corresponding corresponding view type, actual access object relationship table, obtains and all view relations of the relevant given view of object, and deletes view relation.So repeat, until related institute view relation is all deleted.
In the above embodiments of the present application, view version identifier being inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, method can also comprise:
Steps A 4, in object relationship figure, obtains the one or more object relationships taking the 4th default object as starting point.First this step determines object, and determines and will delete the corresponding view version of object.
Step B4, meet check demand in the situation that at the corresponding view type of object relationship, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the 4th default object are shown as view relation.This step realizes according to object relationship figure, taking the object type that need to check view as starting point, search for its incidence relation, if on its incidence relation, be attached with corresponding view type, this object relationship table of actual access, obtains all view relations relevant to instance objects given view, and system shows these view relations and relationship object.
Step C4, the one or more object relationships that are starting point by the 4th default object are obtained the related object of the 4th default object, and according to the related object circulation execution step A4 and the B4 that obtain, until obtain and show all view relations.This step realizes according to the object relationship between object, obtain all relevant objects, on object relationship figure, search for its correlationship, if its relation institute is corresponding corresponding view type, actual access object relationship table, obtains and all view relations of the relevant given view of object, and system shows these object relationships and relationship object.So repeat, until related view relation all shows.
Hence one can see that, and above-described embodiment is by the corresponding view type of object relationship figure, while realizing view access, and the search to object network and demonstration.
It should be noted that, can in the computer system such as one group of computer executable instructions, carry out in the step shown in the process flow diagram of accompanying drawing, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
From above description, can find out, the present invention has realized following technique effect: the Data View that the application creates has done further type according to type and divided, and carry out abstract according to data type to Data View, obtain the new data view creating by demand, in the time that system is carried out in a large number various operation frequently to database, what only pay close attention to is the relation between object, the abstract object relationship that obtains is according to demand carried out to each generic operation, improve the efficiency of the each generic operation of database, reduce the error rate of operations function.The application realizes in the time that current data and historical data view store together, and can carry out easily the operation such as backup and recovery of historical data view.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that multiple calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or the multiple modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (8)

1. a disposal route for Data View, is characterized in that, comprising:
Create according to demand one or more view types of Data View, described view type comprises any one or more objects and the object relationship in the object relationship figure of described Data View, wherein, described in each, view type characterizes in a described Data View and has same alike result object relationship, has same alike result object relationship and also forms a described Data View;
For one or more described view types create corresponding view version;
Obtain the view version identifier of described view version, wherein, described view version characterizes the view type of predetermined instant;
Described view version identifier is inserted in one or more object relationship tables, to obtain the object relationship figure with view version identifier,
Wherein, described view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, described method also comprises:
Steps A 1, in described object relationship figure, obtains the one or more object relationships taking the first default object as starting point;
Step B1, in the situation that the corresponding view type of described object relationship meets backup requirements, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the described first default object are saved as to view relation;
Step C1, the one or more object relationships that are starting point by the described first default object are obtained the related object of the described first default object, and according to the related object circulation execution step A1 and the B1 that obtain, until obtain all view relations to obtain Backup Data view.
2. method according to claim 1, is characterized in that, described view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, described method also comprises:
Steps A 2, in described object relationship figure, obtains the one or more object relationships taking the second default object as starting point;
Step B2, in the situation that the corresponding view type of described object relationship meets reduction demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the described second default object are copied, to obtain the view relation that needs reduction;
Step C2, the one or more object relationships that are starting point by the described second default object are obtained the related object of the described second default object, and according to the related object circulation execution step A2 and the B2 that obtain, obtain all view relations of reduction that need to obtain restoring data view until copy.
3. method according to claim 1, is characterized in that, described view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, described method also comprises:
Steps A 3, in described object relationship figure, obtains the one or more object relationships taking the 3rd default object as starting point;
Step B3, in the situation that the corresponding view type of described object relationship meets deletion demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the described the 3rd default object are deleted as view relation;
Step C3, the one or more object relationships that are starting point by the described the 3rd default object are obtained the related object of the described the 3rd default object, and according to the related object circulation execution step A3 and the B3 that obtain, until obtain and delete all view relations.
4. method according to claim 1, is characterized in that, described view version identifier is inserted in one or more object relationship tables, after obtaining the object relationship figure with view version identifier, described method also comprises:
Steps A 4, in described object relationship figure, obtains the one or more object relationships taking the 4th default object as starting point;
Step B4, meet check demand in the situation that at the corresponding view type of described object relationship, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the described the 4th default object are shown as view relation;
Step C4, the one or more object relationships that are starting point by the described the 4th default object are obtained the related object of the described the 4th default object, and according to the related object circulation execution step A4 and the B4 that obtain, until obtain and show all view relations.
5. a treating apparatus for Data View, is characterized in that, comprising:
The first creation module, for creating according to demand one or more view types of Data View, described view type comprises any one or more objects and the object relationship in the object relationship figure of described Data View, wherein, described in each, view type characterizes in a described Data View and has same alike result object relationship, has same alike result object relationship and also forms a described Data View;
The second creation module, is used to one or more described view types to create corresponding view version;
Acquisition module, for obtaining the view version identifier of described view version, wherein, described view version characterizes the view type of predetermined instant;
Insert module, for inserting one or more object relationship tables by described view version identifier, to obtain the object relationship figure with view version identifier; And
Backup module, be used at described object relationship figure, obtain the one or more object relationships taking the first default object as starting point, in the situation that the corresponding view type of described object relationship meets backup requirements, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the described first default object are saved as to view relation; The one or more object relationships that are starting point by the described first default object are obtained the related object of the described first default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain all view relations to obtain Backup Data view.
6. device according to claim 5, is characterized in that, described device also comprises:
Roll-back module, at described object relationship figure, obtains the one or more object relationships taking the second default object as starting point; In the situation that the corresponding view type of described object relationship meets reduction demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the described second default object are copied, to obtain the view relation that needs reduction; The one or more object relationships that are starting point by the described second default object are obtained the related object of the described second default object, and carry out above-mentioned two steps according to the related object circulation obtaining, obtain all view relations of reduction that need to obtain restoring data view until copy.
7. device according to claim 5, is characterized in that, described device also comprises:
Removing module, at described object relationship figure, obtains the one or more object relationships taking the 3rd default object as starting point; In the situation that the corresponding view type of described object relationship meets deletion demand, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the described the 3rd default object are deleted as view relation; The one or more object relationships that are starting point by the described the 3rd default object are obtained the related object of the described the 3rd default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain and delete all view relations.
8. device according to claim 5, is characterized in that, described device also comprises:
Check module, at described object relationship figure, obtain the one or more object relationships taking the 4th default object as starting point; Meet check demand in the situation that at the corresponding view type of described object relationship, read the view version identifier in the corresponding object relationship table of this object relationship, and according to the view version identifier obtaining, all object relationships of the described the 4th default object are shown as view relation; The one or more object relationships that are starting point by the described the 4th default object are obtained the related object of the described the 4th default object, and carry out above-mentioned two steps according to the related object circulation obtaining, until obtain and show all view relations.
CN201110440007.1A 2011-12-24 2011-12-24 Method and device for processing data view Active CN102521401B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110440007.1A CN102521401B (en) 2011-12-24 2011-12-24 Method and device for processing data view

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110440007.1A CN102521401B (en) 2011-12-24 2011-12-24 Method and device for processing data view

Publications (2)

Publication Number Publication Date
CN102521401A CN102521401A (en) 2012-06-27
CN102521401B true CN102521401B (en) 2014-10-15

Family

ID=46292314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110440007.1A Active CN102521401B (en) 2011-12-24 2011-12-24 Method and device for processing data view

Country Status (1)

Country Link
CN (1) CN102521401B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9026557B2 (en) * 2012-09-04 2015-05-05 Sap Se Schema mapping based on data views and database tables
CN103324484B (en) * 2013-06-28 2017-07-28 华为技术有限公司 A kind of method and apparatus for showing view
CN111046035B (en) * 2019-10-29 2021-02-12 三盟科技股份有限公司 Data automation processing method, system, computer equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716137A (en) * 2004-05-25 2006-01-04 费舍-柔斯芒特系统股份有限公司 Version control for objects in a process plant configuration system
CN1794238A (en) * 2004-12-20 2006-06-28 达索系统公司 Process and system for rendering an object in a view using a product lifecycle management database
CN101944089A (en) * 2009-07-10 2011-01-12 北京数码大方科技有限公司 Date view version management method and device for database

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7680767B2 (en) * 2006-03-23 2010-03-16 Microsoft Corporation Mapping architecture with incremental view maintenance

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716137A (en) * 2004-05-25 2006-01-04 费舍-柔斯芒特系统股份有限公司 Version control for objects in a process plant configuration system
CN1794238A (en) * 2004-12-20 2006-06-28 达索系统公司 Process and system for rendering an object in a view using a product lifecycle management database
CN101944089A (en) * 2009-07-10 2011-01-12 北京数码大方科技有限公司 Date view version management method and device for database

Also Published As

Publication number Publication date
CN102521401A (en) 2012-06-27

Similar Documents

Publication Publication Date Title
Jiang et al. Efficient processing of XML twig queries with OR-predicates
US8078570B2 (en) Versioning data warehouses
Theobald et al. Spotsigs: robust and efficient near duplicate detection in large web collections
CN101031907B (en) Index processing
CN101963982B (en) Method for managing metadata of redundancy deletion and storage system based on location sensitive Hash
CN106227800A (en) The storage method of the big data of a kind of highlights correlations and management system
CN105608086A (en) Transaction processing method and device of distributed database system
CN111881223B (en) Data management method, device, system and storage medium
CN100498781C (en) Method for storing metadata of logic document system by adhesion property
KR101549220B1 (en) Method and System for Managing Database, and Tree Structure for Database
CN102521401B (en) Method and device for processing data view
CN104298736A (en) Method and device for aggregating and connecting data as well as database system
CN109376121A (en) A kind of document indexing system and method based on ElasticSearch full-text search
CN101944089A (en) Date view version management method and device for database
US9092338B1 (en) Multi-level caching event lookup
CN107357836A (en) A kind of VNF bags and its image file delet method quoted and equipment
CN104462558A (en) Method and device for modifying words in Lucene index file
CN102193987B (en) Method and system for increasing node data relationship based on OLTP (online transaction processing)
CN107665153A (en) Data back up method, restoration methods and device in a kind of big data system
CN110413724A (en) A kind of data retrieval method and device
CN106326295A (en) Method and device for storing semantic data
CN104376054B (en) A kind of processing method and processing device of persisted instances object
CN110413617B (en) Method for dynamically adjusting hash table group according to size of data volume
CN103891244B (en) A kind of method and device carrying out data storage and search
Tao Dynamic ray stabbing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100080, Room 802, satellite building, No. 63, Zhichun Road, Beijing, Haidian District

Applicant after: Beijing CAXA Technology Co., Ltd.

Address before: 100080, Room 802, satellite building, No. 63, Zhichun Road, Beijing, Haidian District

Applicant before: Beijing Digital Dafang Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING DIGITAL DAFANG TECHNOLOGY CO., LTD. TO: CAXA TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant