The subject matter of the article is heterogeneous model-inhomogeneous data migration between relational and document-oriented data storage models, existing strategies and methods to support such migrations, the use of relational algebra and set theory in the context of databases in building a new data migration algorithm. The goal of the work is to consider the features and procedure of data migration, explore methods to support data migration between relational and documentary data models, build a mathematical model and algorithm for data migration. The following methods were used: analysis and comparison of existing approaches to data migration, choice of strategy for further use in compiling the migration algorithm, mathematical modeling of the algorithm of heterogeneous model-inhomogeneous data migration, formalization of the data migration algorithm. The following tasks were solved in the article: consideration of the concept and types of data migration, justification for choosing a document-oriented data model as a target for data migration, analysis of existing literature sources on methods and strategies of heterogeneous model data migration from relational to document-oriented data model, highlighting advantages and disadvantages existing methods, choosing an approach to the formation of the data migration algorithm, compiling and describing a mathematical model of data migration using relational algebra and set theory, presentation of the data migration algorithm, which is based on the focus on data queries. The following results were obtained: the possibilities of relational algebra and set theory in the context of data models and queries are used, as well as in model redesign, the strategy of migration of data models is chosen, which provides relational and document-oriented data models, the algorithm of application of this method is described. Conclusions: because of the work, the main methods of migration support for different data storage models are analyzed, with the help of relational algebra, set theory a mathematical model is built, and an algorithm for transforming a relational data model into a document-oriented data model is taken into account. The obtained algorithm is suitable for use in real examples, and is the subject of further research and possible improvements, analysis of efficiency in comparison with other methods.