April 17, 2006 at 12:25 am
Help me to decide who is wrong !
I am newest in adm SQL server and I've heard from some that is better to not to use many stored procedure and to programming everythig in front and program script , and criteria for script vs store procedure is number of record in tables.What's going on ? What's your opinion ? Please answer me .
April 17, 2006 at 9:35 am
I'd give you the opposite advice. Do everything you can with stored procs.
Performance is usually better
It keeps the data management in the database where, in my opinion, it belongs
Impact analysis is simpler
It provides a consistant interface to any applications wishing to consume the data
It provides for enforcement of business rules and logic irregardless of the application
The issue isn't as much about performance as it is about where you believe business logic should be enforced. That particular debate launches very long threads in some discussion forums. IMHO, the database should manage the data, including the business rules that ensure it accurately reflects the business state, and the front end should make it pretty and handle workflow.
April 17, 2006 at 9:44 am
I concur with David. In fact you should look at past threads on this site about that debate.
April 17, 2006 at 9:53 am
There's (at least) an article on this - the discussion/ensuing comments make for a really good & informative read - also a post on the same topic...
2) where to build business logic
**ASCII stupid question, get a stupid ANSI !!!**
April 18, 2006 at 12:35 pm
In addition to the argument over where business logic belongs, there is the issue of security.
Data can be secured easily if all access is through views and stored procedures (i.e. SELECT rights granted on views and EXECUTE rights granted on sp's that perform all INSERT, UPDATE, and DELETE operations, but tables have no permissions for public or users).
Control (and possibly stability, reliability, etc) is nonexistent if general permissions on tables are granted so applications can run anything as a query. Are all developers good enough to prevent SQL injection vulnerabilities?
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply