Contents
Is it good to write business logic in stored procedure?
“The default stance in designing an application should be that business logic is held in the application code, NOT in database stored procedures. Only move business logic into StoredProcedures as performance needs required. “
What are the pros and cons of using stored procedures pros and functions?
Any data errors in handling stored procedures are not generated until runtime….Portability –
| Advantages | Disadvantages |
|---|---|
| It is faster. | It is difficult to debug. |
| It is pre-compiled. | Need expert developer, since difficult to write code. |
| It reduces network traffic. | It is database dependent. |
| It is reusable. | It is non-portable. |
What is business logic in SQL Server?
Business logic is supposed to be the part of the application where you deal with customer or user facing decisions and computations. My argument then is that every SQL query you send to the server embeds some business logic.
What are the pros and cons of stored procedures in web application?
Rework may be reduced for changing applications when the database stays the same. Cons of holding all the business logic on stored procedures in web application: against: Good SQL knowledge can be hard to find in many locations. Good SQL coders can be expensive.
Can you hold business logic in stored Procs?
Stored procedures and views can make this easily possible without your clients being a database whiz. Especially in an age of web services and REST-ful 3rd party web applications, you won’t be able to contain all of your business logic in stored procs.
What are the advantages of storing procedures in one location?
Having Stored Procedures in one location means that there’s no confusion of having business rules spread over potentially disparate code files in the application
What are the pros and cons of databases?
Databases are fast and optimized and can be scaled well. The same procedures can be called from mutiple, different frameworks and languages. The logic is decoupled from the implementation in particular applications. Rework may be reduced for changing applications when the database stays the same.