design – Handling Legacy Database with Spring Boot Java


We are given a task to create an Web Service API for a mobile application. The problem is we have to use a legacy database that is not normalized and its very tedious to work with. We are accustomed of using Object-relational Mapping for implementing the Repository layer including the database so that its easier and efficient for developing. But this time it became quite unable for to utilize it.

What we found so far to be a solution, is to use native queries and manually mapping the value to POJO or DTO from the queries. But of course, this lead to more maintenance and complexity brought by manually performing queries considering also the database relationships.

Aside from this approach, we would like to know more opinions and ideas on what approaches are possible that is much effective.