| Allowing multilevel analysis, hierarchies are considered as a central concept in data warehouses. Unfortunately, current datawarehouse models do not integrate all types of hierarchies that can be defined over data. In particular, hierarchies can hardly be defined on measure attributes. In this paper, we tackle this issue and we show that measure generalizations often depend on a context. For instance, a given arterial pressure can be characterized as being either low, normal or high not only regarding the collected measure but also regarding characteristics of the patient such as the age. In a previous work, these kinds of contextual hierarchies have been proposed. The contribution of this paper is threefold. (1) Thanks to an external database storing the domain knowledge, we model and implement an effective solution for considering these hierarchies in a datawarehouse system. (2) In order to efficiently manage the domain knowledge, a Rich Internet Application (RIA) allowing the insertion, the update or the deletion of specific knowledge is developed. (3) Finally, in order to provide a flexible, efficient and appropriate analysis, a query rewriting module is developed. Thanks to this mechanism, it is now possible to correctly answer queries such as: ``Who had a low arterial pressure last night?''. |