The problem of migrating data is present in almost every application development process, such as datawarehousing and application integration. The process of migrating data involves firstly the mapping between the structures of the source and target databases and secondly the migration of the data from the source to the target. This paper presents an algorithm to implement this process. The algorithm is based on the idea that databases store meaningful facts, rather then instances of atomic data. The fact approach simplifies the algorithm and generalizes the problem of mapping and migrating data into the problem of mapping and migrating two kinds of facts: independent facts and dependent facts. The algorithm has been implemented in a prototype tool to prove the idea and for further research.