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?
Member
65 Points
570 Posts
Application logic in T-SQL
Dec 02, 2011 08:06 AM|mm8|LINK
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?
Participant
1535 Points
545 Posts
Re: Application logic in T-SQL
Dec 02, 2011 08:15 AM|rkchaudary|LINK
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.
RkChaudary
blog
Member
65 Points
570 Posts
Re: Application logic in T-SQL
Dec 02, 2011 08:54 AM|mm8|LINK
I am looking for some "proof" of this, perhaps a comparison of the performance or something.
Contributor
6711 Points
2334 Posts
Re: Application logic in T-SQL
Jan 18, 2012 02:13 AM|cnranasinghe|LINK
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