Java – How to convert old data to a new system? using sql or managed code


Let say a company are building a brand new application. The application are following the DDD principles.
The old codebase has alot of products (or another "entity" for the company) that they want to convert to the new codebase.

How should this work be done? normally it is faster and easier to import using for examples ssis,-transferring from one database to another. But the main problem here is that alot of the BusinessRules (implemented in managed code in the DomainLayer) is skipped…
Is this good enough if the develeoper says: "i have it under control. The rules are duplicated as sql scripts…"

Should we import the managed code libraries into the SQL Server (atleast this is possible in .NET and MS SQL Server)?
Or should we we create a import script in managed code so all the layers in the domain are traversed when the entity are saved in the database?… (can take many hours..)

What are your thoughts?

Best Solution

I would suggest that you write a little - import-application in .NET where you can apply the business rules. Since this task (at least I suppose so) will only run once (or twice ;)) speed is not that important - for speeding it up - design it to be multi-threaded - if possible.

and no it is not good enough - if anyone says "I have it under control" - this is a buzz-sentence and all my alarm-bells go off. some detail will always be forgotten and this is mostly a little catastrophe ;)

Related Question