locked
Application logic in T-SQL RRS feed

  • Question

  • User-94466089 posted

    Is there any official Microsoft guidelines stating that it is more efficient to write programatically more advanced business logic in C# rather than T-SQL?

    If I for example want to parse a semi colon separated text file with say 20 columns and 100 000 rows and validate each of the values in the columns, e.g. check if some columns have valid data types,  I guess the preferred way of doing this is in C#/VB.NET rather than in a stored procedure or am I wrong?

    Friday, December 2, 2011 8:06 AM

All replies

  • User-1976337891 posted

    yes, database is costly a resource. so you should not include your business logic in T-Sql.

    it is so trivial that you can find this even in your company's "standards & guidelines".

    sorry, i don't have any url to share.

    Friday, December 2, 2011 8:15 AM
  • User-94466089 posted

    I am looking for some "proof" of this, perhaps a comparison of the performance or something.

    Friday, December 2, 2011 8:54 AM
  • User-37275327 posted

    Hope you find some clues from following links

    http://stackoverflow.com/questions/3913799/c-sharp-code-and-sql-server-performance

    http://www.codeproject.com/KB/database/sqldodont.aspx

    http://stackoverflow.com/questions/8900384/performance-issues-between-sql-server-and-c-sharp

    Wednesday, January 18, 2012 2:13 AM