Abstract:A warehouse is a data repository containing integrated information for efficient querying and analysis, which data come from the databases or the other info-sources at different places. Materialized view is the primary information entity stored in the data warehouse. It must be refreshed when the corresponding data changed in the database. Consistency problem will be arisen during materialized views on-line maintenance because of the invention of OLAP query. In this paper, the authors introduce a new algorithm, MVCA (multiversion compensating algorithm), using multiversion and compensating techniques, along with acknowledgement mechanism to synchronize the maintenance process between the database and the data warehouse so as to ensure the data consistency. At the end of the paper, the authors illustrate the application of the algorithm by a typical example.