A Data Warehouse Model and Its Application
By designing a new data warehouse model and adopting a new structural design data warehouse model, the problem of inefficient data storage and modification in the existing technology is solved, the state management and flexible modification of data records are realized, and the work efficiency of data warehouse applications is improved.
Patent Information
- Application Number
- CN201910929830.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-27
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2039-09-27
AI Technical Summary
The existing data warehouse model is inefficient in data storage and modification, and is complex in operation, making it difficult to meet the needs of data warehouse applications.
A new data warehouse model was designed, adopting a new structural design, including proxy keys, operation time, operation type, pre-record field and status automatic end time field, through which the state management of data records and flexible data modification are realized.
This model can clearly mark the status of each record, simplify the data modification process, improve the work efficiency of data storage applications in the data warehouse, and is suitable for business analysis in various scenarios.
Smart Images

Figure CN112579706B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a data warehouse model and application thereof, belonging to the technical field of data warehouse models. Background Art
[0002] The star model is a multidimensional data relationship, which consists of a fact table and a set of dimension tables. Each dimension table has a dimension as the primary key, and the primary keys of all these dimensions are combined to form the primary key of the fact table. The non-primary key attributes of the fact table are called facts, which are generally numerical values or other data that can be calculated; while the dimensions are text, time and other types of data. By organizing the data in this way, we can perform aggregation calculations such as summarization, average, count, and percentage of these fact data according to different dimensions (part or all of the primary key of the fact table), and even perform 20-80 analysis, so that we can analyze the situation of the business subject from different angles.
[0003] The star model is a non-normalized structure. Each dimension of the multidimensional data set is directly connected to the fact table. The emphasis is on pre-processing the dimensions, combining multiple dimensions into a fact table to form a wide table. This is why we often see some large wide tables. Large wide tables are generally fact tables, which contain the primary keys associated with the dimensions and some measurement information, while the dimension table is the specific information of the dimensions in the fact table. When used, data is generally combined through joins, which is relatively convenient for OLAP analysis. Since the star model does not have a gradually changing dimension, there is a certain degree of data redundancy, such as Figure 1 shown.
[0004] When one or more dimension tables are not directly connected to the fact table, but are connected to the fact table through other dimension tables, the diagram is like multiple snowflakes connected together, so it is called a snowflake model. The snowflake model is an extension of the star model. It further hierarchizes the dimension tables of the star model. The original dimension tables may be expanded into small fact tables to form some local "hierarchical" areas. These decomposed tables are connected to the main dimension table instead of the fact table. Figure 2 As shown in the figure, the region dimension table is decomposed into country, province, city and other dimension tables. Its advantages are: improving query performance by minimizing the amount of data storage and joining smaller dimension tables. The snowflake model is more in line with the database paradigm and reduces data redundancy, but when analyzing data, the operation is more complicated and more tables need to be joined, so its performance is not necessarily higher than that of the star model. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a data warehouse model, which adopts a new model structure design, which can not only clearly mark the status of each record, but also facilitate the modification of data in the model, thereby improving the work efficiency of data storage applications in the data warehouse.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions: the present invention designs a data warehouse model, which is used to realize the construction of each table in the data warehouse for each data record extracted from each data source, wherein each data record extracted from each data source is stored in the data warehouse in the form of a new data record according to different versions of data, and the historical version of data records are still preserved; the data warehouse model includes each business field corresponding to each data source respectively; it also includes a surrogate key and an operation time, wherein the surrogate key is used to uniquely identify each data record in the data warehouse; the operation time is used to identify the starting time of the state corresponding to each data record in the data warehouse.
[0007] As a preferred technical solution of the present invention: the data warehouse model also includes an operation type, which is used to identify changes in business fields corresponding to different business data in each data record under the same natural key and at adjacent operation times in the data warehouse.
[0008] As a preferred technical solution of the present invention: the data warehouse model also includes a previous record field, which is used to identify the surrogate key of the data record under the same natural key and at the adjacent previous operation time in the data warehouse.
[0009] As a preferred technical solution of the present invention: the data warehouse model also includes a state automatic end time field, which is used to identify the time when the state corresponding to each data record in the data warehouse automatically ends. If there is no automatic end time for the state corresponding to the data record, the state automatic end time field of the data record is empty or infinite.
[0010] As a preferred technical solution of the present invention: the data warehouse model also includes a state machine corresponding to each table, and the state machine is used to identify the change relationship between different states corresponding to each data record in the corresponding table, as well as the change action and change condition.
[0011] Corresponding to the above, the technical problem to be solved by the present invention is to provide an application of a data warehouse model, which uses a model with a new structural design to record the data in the data warehouse, which can not only clearly mark the status of each record, but also facilitate the modification of the data in the model, thereby improving the work efficiency of data storage applications in the data warehouse.
[0012] In order to solve the above technical problems, the present invention adopts the following technical solution: The present invention designs an application of a data warehouse model, including a state duration acquisition method, which is used to realize the acquisition of the duration of the state corresponding to the target data record in the data warehouse, and is performed as follows:
[0013] If there is an adjacent data record with the same natural key in the data warehouse corresponding to the target data record, and the operation time of the adjacent data record is less than the operation time of the target data record, then the time difference between the operation time in the target data record and the operation time in the adjacent data record is the duration of the state corresponding to the target data record;
[0014] If there is no next data record with the same natural key after the target data record, and the automatic end time of the state in the target data record is empty or infinite, then the time difference between the operation time and the current time in the target data record is the duration of the state corresponding to the target data record;
[0015] If there is no next data record with the same natural key after the target data record, and the state automatic end time field in the target data record is non-empty and non-infinite, or the operation time in the next data record is later than the state automatic end time in the target data record, then the time difference between the operation time in the target data record and its state automatic end time field is the duration of the state corresponding to the target data record.
[0016] As a preferred technical solution of the present invention, a method for obtaining the latest data record is included, which is used to obtain the latest data record corresponding to the target operation type under the target natural key in the data warehouse, and is performed as follows:
[0017] First, obtain each data record corresponding to the target operation type under the target natural key in the data warehouse; then select the data record corresponding to the last operation time, which is the latest data record corresponding to the target operation type under the target natural key.
[0018] As a preferred technical solution of the present invention, a method for obtaining the statistical duration of a target class state is included, which is used to realize the duration statistics of the target class state under the target natural key in the data warehouse, and is performed as follows:
[0019] First, each data record corresponding to the target natural key and target class state in the data warehouse during the time period is obtained as the data record to be processed; then the operation time in each data record to be processed and the time difference between the operation time in the next data record in the corresponding adjacent time sequence are obtained; finally, the cumulative result of each time difference is statistically obtained, which is the duration statistics of the target natural key and target class state in the data warehouse.
[0020] As a preferred technical solution of the present invention, a state checking method is included to implement the check of the state corresponding to the data records in each table in the data warehouse. When operating periodically or on a table, the following is performed:
[0021] According to the change relationship between different states corresponding to each data record in the table represented by the state machine, as well as the change action and change conditions, the corresponding table is checked and an alarm is issued if an error occurs.
[0022] The data warehouse model and its application described in the present invention, using the above technical solution, has the following technical effects compared with the prior art:
[0023] The data warehouse model and its application designed by the present invention have the following beneficial effects: 1. Unifying the data organization form to make modeling simpler and more standardized; 2. Being compatible with more storage engines and improving the efficiency of data ETL; 3. Providing more direct single-table analysis capabilities and more flexible data association logic, suitable for business analysis in various scenarios; 4. Being able to help achieve more highly cohesive data integration work and organize data in a more object-oriented manner; 5. Continuous integration of new data sources is more convenient, because each model table is relatively independent and the impact of continuous integration is relatively low; 6. Providing a more effective continuous integration modeling idea, the basic business model and the requirements are analyzed separately, and a relatively basic and more general data warehouse can be provided initially, and then the design and integration construction can be continuously carried out according to the requirements; 7. Being able to promote the design and development of state migration inspection functions according to the pre-defined state machine, check the accuracy of data in real time, and issue alarms in time. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is an example schematic diagram of a star model in the prior art;
[0025] Figure 2 is an example schematic diagram of a snowflake model in the prior art;
[0026] Figure 3 It is an example schematic diagram of designing a data warehouse model of the present invention. DETAILED DESCRIPTION
[0027] The specific implementation modes of the present invention will be further described in detail below in conjunction with the accompanying drawings.
[0028] There are three types of gradual changes in slowly changing dimensions. In many cases, in order to retain historical versions, the TYPE2 form of slowly changing dimensions is used to organize dimension data, that is, the new version is stored in the form of a new record, and the historical version records are still retained. Generally, three new fields are added - surrogate key (used to distinguish version records), state start time (used to record the start time of the state), and state end time (used to record the end time of the state. If the state has not ended, the record is null). When a new state is generated, the state end time field of the previous state will be set to that time, and the new state will be stored in the form of a new record, so that each state record forms a zipper table.
[0029] At this time, each record is stored in the form of a state, with a state start time and a state end time. However, in many cases, modifying a large number of data records in the database is a very performance-intensive task. The performance of deletion and modification operations is generally much worse than that of addition and query operations. In addition, some storage engines, such as HDFS, make it difficult to modify existing data.
[0030] Therefore, the present invention designs a data warehouse model for constructing each table in the data warehouse for each data record extracted from each data source, wherein, based on the TYPE2 format, each data record extracted from each data source is stored in the data warehouse in the form of a new data record according to different versions of data, and the historical version of data records are still preserved in the process of entering each data record into the data warehouse in sequence. And the design converts the state record into an action record, the state record has a start time and an end time, if the start time and the end time are converted into the operation time, an action record is formed, the action causes the state migration, the time difference between the two actions is the duration of the state, if there is no next action, the state will continue.
[0031] That is, in the existing TYPE2 format, when each data record is extracted from each data source and stored in the data warehouse, the data warehouse model includes not only the business fields corresponding to each data source, but also a surrogate key and an operation time, wherein the surrogate key is used to uniquely identify each data record in the data warehouse; the operation time is used to identify the starting time of the state corresponding to each data record in the data warehouse.
[0032] For example, for the change of household registration address in the household registration information table, the original household registration change record A remains unchanged, and a new household registration change record B is added with the proxy key +1. The operation time is the time of changing the household registration place, the household registration address field value is the new address, and the other field values remain unchanged and a new copy is made.
[0033] In the data warehouse model designed by the present invention, in addition to the newly added surrogate key and operation time, it also includes the operation type, the previous record field, and the state automatic end time field, wherein the operation type is used to identify the change of the business field corresponding to different business data in each data record under the same natural key and adjacent operation time in the data warehouse. The operation type is introduced because if there are multiple dimensions in the dimension table, such as household registration address, household registration type, native place, etc., each dimension may change. Only using the two fields of surrogate key and operation time cannot distinguish which dimension has changed. At this time, the operation type field is added to distinguish; the operation type is converted from the business status, for example, the operation type is "change household registration address".
[0034] In practical applications, in order to better form an action chain and facilitate the acquisition of state duration, a previous record field is introduced to identify the surrogate key of the data record under the same natural key and adjacent to the previous operation time in the data warehouse, that is, the previous action record is associated in the data ETL process.
[0035] The state automatic end time field is used to identify the time when the state corresponding to each data record in the data warehouse automatically ends. If there is no automatic end time for the state corresponding to the data record, the state automatic end time field of the data record is empty or infinite, such as the expiration time of the program content, or the user finishes watching the program content without any operation.
[0036] Based on the above-mentioned newly added design of each field of the data warehouse model, a further design includes a state machine corresponding to each table. The state machine is used to identify the change relationship between different states corresponding to each data record in the corresponding table, as well as the change action and change condition. The above-mentioned operation type field stores the code value of the action or condition that causes the state to migrate, which is converted from the state enumeration value. For example, the user online state is caused by the user login action. For standardization, these code values need to be sorted into dictionary enumeration values according to the business model. At the same time, these states, actions, and conditions are sorted into state machines, the complete state transition chain is determined, and the state transition table is output, that is, the state machine corresponding to each table. For example, in a simple user online detection system, the user online and offline is a complete state chain. Finally, the sorted state machine conversion logic is added to the ETL processing logic, which realizes the state machine. The state transition table is shown in Table 1 below.
[0037]
[0038] Table 1
[0039] In actual applications, the previous record field is heavily dependent on the state machine. A mature and correct state machine can perform real-time checks during data ETL. An immature or incorrect state machine will cause wrong records when data is lost, resulting in a certain cost for subsequent corrections (modifying the value of the previous record field of the next action record to the surrogate key of the new record). Therefore, this field can be added based on actual conditions.
[0040] In summary, the data warehouse model designed by the present invention is as follows: Figure 3 As shown in the figure, the dimension table and the fact table are unified into the same data organization form. There are no more clearly defined themes and the core of the themes. It is no longer possible to clearly distinguish the stars from the corners, the center from the edges. They are like the stars seen in the sky from the earth. The stars are independent of each other, but can be combined and connected into constellations according to people's imagination. This imagination is the business logic. There is no need to strictly organize the relationship in a certain shape. We call this model the "star point model". The original dimension table and fact table are only unified in table structure, but their functions remain unchanged. They are still called dimension tables and fact tables respectively. Each dimension table is also similar to an object in an object-oriented programming language.
[0041] In order to better meet business reality, such as Figure 3 As shown, the department table adds fields such as location, establishment time, and number of department personnel; the product table adds fields such as production time and production address. As can be seen from the figure, if you want to statistically analyze the product production situation of a certain historical period, or the number of department personnel in a certain historical period, using a star model or a snowflake model, you need to design a product production fact table and a department personnel fact table separately, and then associate them with the product dimension table and the department dimension table respectively. However, using the data warehouse model designed by the present invention, since the fact table and the dimension table are integrated together and no longer distinguished, the product table itself can analyze the product production situation of a certain historical period, and even the product production situation of a certain region, without the need to design a separate fact table. Similarly, the department table itself can also be used for various department-related statistical analyses without the need to design a separate fact table for it.
[0042] For new models, a modeling method that matches the new model is required. Generally, there are two approaches to data warehouse modeling: The first approach is top-down. First, determine the subject based on the needs, then determine the fact table of the subject, and finally determine the related dimension table. The second approach is bottom-up. First, find all the dimensions based on the business model, then determine the facts based on the relationship between the dimensions, and finally filter out the useful subjects. It should be noted that the modeling step is likely to be an iterative process, so as to continuously modify the errors and omissions of the previous design, and also facilitate the continuous integration of subsequent new data sources.
[0043] The present invention adopts a bottom-up approach, starting from the business model, putting aside the data source, and designing a data model that conforms to the business model. First, determine the dimensions and their attributes. If there is a business model, determine all the dimensions involved in the business model. If there is no business model, it is necessary to analyze and determine each dimension from the existing data source. After determining the dimensions, determine the attributes of each dimension respectively, and identify "simple attributes" and "composite attributes" (similar to simple data types and complex data types in the Java language) at the same time, and analyze whether it is necessary to separate the attributes from the dimension table. For composite attributes, the dimension table is generally separated. The independent dimension table and the dimension table to which it belongs are respectively called the slave dimension table and the master dimension table.
[0044] Design the corresponding physical model and create the physical table structure for the dimensions and attributes analyzed above. Add the surrogate key, operation time, operation type, previous record field, state automatic end time field, and various business fields to each dimension table. It should be noted here that there is no need to record a start action and an end action for the same state. The operation time of the next action is the end time of this state and the start time of the next state.
[0045] At this stage, if there is no clear demand, the basic model design and physical table structure creation have been completed, and you can start looking for the corresponding data source table, make a good mapping relationship between the data source table and the physical model table, and perform ETL work from the data source table to the physical model table. Since the dimension table of this model itself has the ability to be analyzed, the analysis of a single table and the association analysis between the primary dimension table and the secondary dimension table can be performed at this time.
[0046] If you need to preset some multi-table analysis topics, or have some clear multi-table analysis requirements, then proceed as follows: list the dimension tables related to the requirements, and clarify the relationship between these dimensions, including actions and quantities. For example, the relationship between users watching movies and TV shows is many-to-many. This result is the fact table, and you can perform physical modeling and start ETL work. Similarly, if new requirements are added later, continuous modeling and ETL integration work should be performed in the same way.
[0047] If there is really no need for analysis, but you want to preset some multi-table analysis topics, you can list the relationships between all dimensions through permutations and combinations, including two-by-two relationships, three-by-three relationships, four-by-four relationships, etc. Finally, filter out the relationships that are meaningful, which are the fact tables. Of course, the results of the permutations and combinations are very large, so you need to arrange the priority and time plan for implementation.
[0048] In summary, the modeling method of the present invention is divided into two stages. The first stage is the independent dimension stage, in which all independent dimension tables (except the master dimension table and the slave dimension table) are analyzed and designed. The second stage is the dimension association stage, in which the association relationship analysis is performed according to the requirements or permutations and combinations, and the fact table is finally determined. The modeling advantage of the present invention is revealed. The basic business model and requirements can be analyzed and designed separately. A relatively basic and general data warehouse model can be provided initially, and then the design and integration construction can be continuously continued according to the requirements.
[0049] The data warehouse model designed by the present invention is applied in practice, including a method for obtaining the duration of a state, a method for obtaining the latest data record, a method for obtaining the statistical duration of a target class state, and a method for checking a state. Among them, the method for obtaining the duration of a state corresponding to a target data record in a data warehouse is used to obtain the duration of the state, which is performed as follows:
[0050] If there is an adjacent data record with the same natural key in the data warehouse corresponding to the target data record, and the operation time of the adjacent data record is less than the operation time of the target data record, then the time difference between the operation time in the target data record and the operation time in the adjacent data record is the duration of the state corresponding to the target data record;
[0051] If there is no next data record with the same natural key after the target data record, and the automatic end time of the state in the target data record is empty or infinite, then the time difference between the operation time and the current time in the target data record is the duration of the state corresponding to the target data record;
[0052] If there is no next data record with the same natural key after the target data record, and the state automatic end time field in the target data record is non-empty and non-infinite, or the operation time in the next data record is later than the state automatic end time in the target data record, then the time difference between the operation time in the target data record and its state automatic end time field is the duration of the state corresponding to the target data record.
[0053] Taking the first case as an example, it can be known from the grammar of natural language that to determine a predicate, it is necessary to find the subject and object to which it belongs, and the difference in operation time of two records with adjacent surrogate keys of the same subject and object is the duration of the state. In combination with the present invention, it is known that the predicate is the operation type field, and the subject and object need to be determined according to the actual business scenario. Taking the user watching the on-demand program as an example, the subject is the user, that is, userid, the object is the program, that is, contentid, and the predicate is the various actions in watching the program, including play, pause, fast forward, fast rewind, exit, etc., which is the enumeration value in the operation type field. Then, to calculate the duration of the first action (press play) of userid=u01 watching the content of contentid=c01 (regardless of what the next action is), the difference in operation time of the two records with adjacent surrogate keys of u01+c01 is the duration of the first play action of user u01 watching content c01. Of course, in actual situations, the subject may be multiple fields, and the object may also be multiple fields.
[0054] The latest data record acquisition method is used to obtain the latest data record corresponding to the target operation type under the target natural key in the data warehouse, and is executed as follows:
[0055] First, obtain each data record corresponding to the target operation type under the target natural key in the data warehouse; then select the data record corresponding to the last operation time, which is the latest data record corresponding to the target operation type under the target natural key.
[0056] The target class state statistics duration acquisition method is used to realize the duration statistics of the target class state under the target natural key in the data warehouse, and is executed as follows:
[0057] First, each data record corresponding to the target natural key and target class state in the data warehouse during the time period is obtained as the data record to be processed; then the operation time in each data record to be processed and the time difference between the operation time in the next data record in the corresponding adjacent time sequence are obtained; finally, the cumulative result of each time difference is statistically obtained, which is the duration statistics of the target natural key and target class state in the data warehouse.
[0058] The status check method is used to check the status of data records in each table in the data warehouse. When operating periodically or on a table, it is executed as follows:
[0059] According to the change relationship between different states corresponding to each data record in the table represented by the state machine, as well as the change action and change conditions, the corresponding table is checked, and if an error occurs, an alarm is issued. Therefore, when there is a mature and correct state machine, the action record with state transition errors can be quickly repaired and the correct real record can be supplemented. If the recorded data is completely lost without timely supplementation, or if there is no correct state machine, then the action record with state transition errors needs to use a certain data supplementation algorithm in the data application to avoid data loss. In actual applications, according to the defined state machine, if two adjacent action records with incorrect state transitions are found, then an action record that conforms to the state machine is inserted between them.
[0060] The data warehouse model and its application designed by the above technical solution have the following beneficial effects: 1. Unifying the data organization form to make modeling simpler and more standardized; 2. Being compatible with more storage engines and improving the efficiency of data ETL; 3. Providing more direct single-table analysis capabilities and more flexible data association logic, suitable for business analysis in various scenarios; 4. Being able to help achieve more highly cohesive data integration work and organize data in a more object-oriented manner; 5. Continuous integration of new data sources is more convenient, because each model table is relatively independent and the impact of continuous integration is relatively low; 6. Providing a more effective continuous integration modeling idea, the basic business model and requirements are analyzed separately, and a relatively basic and more general data warehouse can be provided initially, and then continuously designed and integrated according to the requirements; 7. Being able to promote the design and development of state migration check functions based on pre-defined state machines, check the accuracy of data in real time, and issue warnings in time.
[0061] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A data warehouse model is used to construct tables in the data warehouse for each data record extracted from each data source, wherein: Each data record extracted from each data source is stored in the data warehouse in the form of a new data record according to different versions of data, while the historical version of data records are still preserved; the data warehouse model includes business fields corresponding to each data source respectively; it is characterized by: it also includes a surrogate key and an operation time, wherein the surrogate key is used to uniquely identify each data record in the data warehouse; the operation time is used to identify the starting time of the state corresponding to each data record in the data warehouse; The data warehouse model also includes an operation type, which is used to identify changes in business fields corresponding to different business data in each data record at adjacent operation times under the same natural key in the data warehouse; The data warehouse model also includes a previous record field, which is used to identify the surrogate key of the data record at the adjacent last operation time under the same natural key in the data warehouse; The data warehouse model also includes a state automatic end time field, which is used to identify the time when the state corresponding to each data record in the data warehouse automatically ends. If there is no automatic end time for the state corresponding to the data record, the state automatic end time field of the data record is empty or infinite; The data warehouse model also includes a state machine corresponding to each table. The state machine is used to identify the change relationship between different states corresponding to each data record in the corresponding table, as well as the change action and change condition.
2. A method for executing a data warehouse model according to claim 1, characterized in that: The method includes a state duration acquisition method, which is used to obtain the duration of the state corresponding to the target data record in the data warehouse, and is performed as follows: if there is a next data record of the adjacent time sequence with the same natural key in the data warehouse corresponding to the target data record, and the operation time of the next data record of the adjacent time sequence is less than the operation time of the target data record, then the time difference between the operation time in the target data record and the operation time in the next data record of the adjacent time sequence is the duration of the state corresponding to the target data record; If there is no next data record with the same natural key after the target data record, and the automatic end time of the state in the target data record is empty or infinite, then the time difference between the operation time and the current time in the target data record is the duration of the state corresponding to the target data record; If there is no next data record with the same natural key after the target data record, and the state automatic end time field in the target data record is non-empty and non-infinite, or the operation time in the next data record is later than the state automatic end time in the target data record, then the time difference between the operation time in the target data record and its state automatic end time field is the duration of the state corresponding to the target data record.
3. The method for executing a data warehouse model according to claim 2, characterized in that: The method for obtaining the latest data record is included, which is used to obtain the latest data record corresponding to the target operation type under the target natural key in the data warehouse, and is executed as follows: First, obtain each data record corresponding to the target operation type under the target natural key in the data warehouse; then select the data record corresponding to the last operation time, which is the latest data record corresponding to the target operation type under the target natural key.
4. The method for executing a data warehouse model according to claim 2, characterized in that: It includes a method for obtaining target class status statistical duration, which is used to realize the duration statistics of the target class status under the target natural key in the data warehouse, and is executed as follows: first, each data record corresponding to the target class status under the target natural key in the data warehouse within the historical period is obtained as the data record to be processed; then, the operation time in each data record to be processed is obtained, and the time difference between the operation time in the next data record in the corresponding adjacent time sequence is obtained; finally, the cumulative result of each time difference is obtained by statistics, which is the duration statistics of the target class status under the target natural key in the data warehouse.
5. The method for executing a data warehouse model according to claim 2, characterized in that: It includes a status check method, which is used to check the status of data records in each table in the data warehouse. When checking the status of a table, the following operations are performed: According to the change relationship between different states corresponding to each data record in the table represented by the state machine, as well as the change action and change conditions, the corresponding table is checked and an alarm is issued if an error occurs.
Citation Information
Patent Citations
Stored data warehouse row and column storage transformation implementation method for database all-in-one machine
CN106874437A
A Hive-based hierarchical design method of a university data warehouse
CN109189764A