I have a legacy database that my new application has to interact with. The old database is over-normalized and poorly designed in general. For instance, one object in my domain represents five tables in the database. I want to keep my domain layer free of artifacts from the legacy database. What pattern should I use here?
At first glance, I think about Repository Pattern. I would pass my object to the repository and let it handle splitting the data up into the five tables. However, it was suggested that all the mapping that must be done adds too much logic to the repository. So, it Repository a bad choice here? Should I use Repository with another pattern (like Adapter)? Or is Repository the right choice in this situation?