Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 132399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:15:23+00:00 2026-05-11T06:15:23+00:00

Let’s say you have a database with a lot of products/customers/orders and the codebase

  • 0

Let’s say you have a database with a lot 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 a proprietary system.

How should we do this ‘write-database-into-a-flat-file? What are the best-practices?

Some thoughts:

  • we could create a stored procedure 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 stored procedure solution)

  • What if the only interface for the domain-services are web services (which could take ‘long’ time for each request), will the ‘best practices’ change ?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:15:24+00:00Added an answer on May 11, 2026 at 6:15 am

    I personally prefer to use normal (managed) code to implement feeds instead of stored procs, mainly because: 1) It’s usually easier to interface with the other system (even if it is only shared drive) 2) It is easy to log everything you need and debug if something goes wrong 3) You can reuse the same code you use for normal business logic (its beneficial even if you just reference the same projects, etc.) 4) Often you need to enrich data with some information from other systems and this again is much easier to do from managed code. 5) Its much easier to test managed code, have all the unit tests, automated builds, etc.

    I am not sure why it needs to be that much slower than doing it all in a stored proc. You just need to write a good stored procedure to extract the data you need, and the C#/java app will do all the transformations, enrichment, etc.

    EDIT: Answering the comment: I don’t think it is possible to say if you should reuse the existing stored procs, tweak them, or create new ones. I think that is the performance hit or needed changes are not too big than I would try to use one set of procs, to avoid duplication of logic. But if the differences are substantial, then probably the cost of maintaining extra procs will be lower than changing and releasing existing ones.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I'm outputting a post title and in our database, it's Hello Y’all
Let's say I have a method in java, which looks up a user in
Let's say that I have a SQLite database that I create in a separate
Let's say I have the following entity: public class Store { public List<Product> Products
Let's say I have a main folder in my website named test which contains
Let's say I have some data in a CouchDB database. The overall size is
Let's say you have a class called Customer, which contains the following fields: UserName
Let's say I have a large amount of files, say 20GB worth, all encrypted
Let's say I don't have photoshop, but I want to make pattern files (.pat)
Let me explain best with an example. Say you have node class that can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.