Availability and performance can be improved using data replication as the basic technique, thus benefitting the services provided by a distributed system. However, replication implies the risk of inconsistency, and the accesses to the data repository must be carefully treated. To deal with consistency in replicated information systems, particularities of the chosen target environment and applications must be considered. To this end, several replication protocols have been discussed in the literature, each one requiring a different set of metadata to be maintained for each replicated database object. In this paper, we discuss the middleware architecture used in the MADIS project for maintaining the consistency of replicated databases. In the proposed architecture, most of the effort is spent using basic resources provided by conventional database systems (e.g. triggers, views, etc). This allows the underlying database to perform more efficiently many tasks needed to support any consi...