On mySimon: Holiday Gifts For Mom And Dad
BNET Business Network:
BNET
TechRepublic
ZDNet
TalkBack 32 of 34:
Next »
« Previous
Are there other benefits?
because these don't sell me on stored procedures.

"They allow modular programming.
You can create the procedure once, store it in the database, and call it any number of times in your program. Stored procedures can be created by a person who specializes in database programming, and they can be modified independently of the program source code."
This is one of the things that I hate about them. If you're crazy enough to share sprocs across apps, then someone can unknowingly break your app while fixing their own.

"They allow faster execution.
If the operation requires a large amount of Transact-SQL code or is performed repetitively, stored procedures can be faster than batches of Transact-SQL code. They are parsed and optimized when they are first executed, and a compiled version of the stored procedure remains in memory cache for later use. This means the stored procedure does not need to be reparsed and reoptimized with each use resulting in much faster execution times."
I have heard this said many times; it is probably true for some cases and maybe a lot of cases. But I've never seen it substantiated.

"They can reduce network traffic.
An operation requiring hundreds of lines of Transact-SQL code can be performed through a single statement that executes the code in a procedure, rather than by sending hundreds of lines of code over the network."
Who is writing hundreds of lines of T-SQL and why? Are they putting a lot of business logic in there? Yikes.

"They can be used as a security mechanism.
Users can be granted permission to execute a stored procedure even if they do not have permission to execute the procedure's statements directly."
Can you give an example of when you would this?

Sprocs aren't evil; it's the people who abuse them. They're a tool like anything else and don't always apply to every problem.
Posted by: DougOfCBS   Posted on: 11/01/05 You are currently: a Guest | Members login | Terms of Use

Alert moderator to an offensive message

Subscribe to this discussion via Email or RSS

I brought this up  Roger Ramjet | 10/31/05
PAPPL?  jpratch | 10/31/05
Its just another trick  Roger Ramjet | 10/31/05
I don't mind, with some reservations  Mark Miller | 10/31/05
Debugging tools for PHP  eheimer | 11/01/05
So what's wrong with Fortran?  Gravitas@... | 10/31/05
Like what?  Not average Joe | 10/31/05
Like handcuffing your code to specific hardware  Robert Kohlenberger | 11/01/05
Right on the Money RK  tbbrickster_z | 11/02/05
Productivity writing assembler?  cgraham_z | 11/03/05
Agree that Database Procedures are Evil  daver_z | 10/31/05
Maybe for small applications  Yensi717 | 10/31/05
OOD  Gravitas@... | 10/31/05
I think  Yensi717 | 10/31/05
Spot on right  Justin James | 10/31/05
Yeah, well...  emofine | 10/31/05
Varying opinions  tero_t_vaananen@... | 11/01/05
Right on.  zztong | 11/01/05
Multiple database vendors  Yensi717 | 11/01/05
Not a pain to edit  Chad_z | 11/01/05
Great framework  bkatz | 10/31/05
Looked like a pain to me...  Justin James | 10/31/05
For Unix deployments you might consider...  Mark Miller | 10/31/05
Message has been deleted.  khakman | 10/31/05
I've heard of Ruby  CobraA1 | 10/31/05
You mean like Smalltalk?  wkharold | 10/31/05
Funny  John Carroll ZDNet Moderator | 10/31/05
true  jimk_z | 10/31/05
true  jimk_z | 10/31/05
Ruby is OO  tero_t_vaananen@... | 11/01/05
Just what are people spouting about?  jacec | 10/31/05
Are there other benefits?  DougOfCBS ZDNet Moderator | 11/01/05
This is not serious development  SQLDBAJames | 05/29/06
Not everything is a nail  rarsa | 11/03/05

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads