Let say you hav a database with alot of products/customers/orders and the codebase (java/c#) contains all the business logic. During the night several batches are needed to export data to flat-files and then ftp them to properitary systems.
how should we do this "write-database-into-a-flat-file? what are the best-practices?
Some thoughts:
- we could create a storedprocedure and use f.ex ssis to fetch the data? maybe we can do this if we have a "batch-output-database-table" but not if we have to do logic before the file is written?
- we could do all the logic in managed code using the same repositories/business logic as the rest of the domain? (this could be a slow process compared to the storeproc solution)
- What if the only interface for the domain-services are webservices (which could take "long" time for each request), will the "best practices" change ?