Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stored procedures or inline queries?

First of all there is a partial question regarding this, but it is not exactly what I'm asking, so, bear with me and go for it.

My question is, after looking at what SubSonic does and the excellent videos from Rob Connery I need to ask: Shall we use a tool like this and do Inline queries or shall we do the queries using a call to the stored procedure?

I don't want to minimize any work from Rob (which I think it's amazing) but I just want your opinion on this cause I need to start a new project and I'm in the middle of the line; shall I use SubSonic (or other like tool, like NHibernate) or I just continue my method that is always call a stored procedure even if it's a simple as

Select this, that from myTable where myStuff = StackOverflow;
like image 533
balexandre Avatar asked Mar 02 '23 05:03

balexandre


1 Answers

It doesn't need to be one or the other. If it's a simple query, use the SubSonic query tool. If it's more complex, use a stored procedure and load up a collection or create a dataset from the results.

See here: What are the pros and cons to keeping SQL in Stored Procs versus Code and here SubSonic and Stored Procedures

like image 124
John Sheehan Avatar answered Mar 06 '23 15:03

John Sheehan