存储过程中支持/反对业务逻辑的参数 [英] Arguments for/against Business Logic in stored procedures

查看:23
本文介绍了存储过程中支持/反对业务逻辑的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

支持和反对存储过程中的业务逻辑的论据是什么?

What are the arguments for and against business logic in stored procedures?

推荐答案

针对存储过程:编程空间中的业务逻辑

我非常重视表达的力量,而且我认为 SQL 空间并没有那么具有表现力.使用手头最好的工具来完成最合适的任务.最好在最高级别上处理逻辑和更高阶的概念.因此,存储和海量数据操作最好在服务器级别完成,可能在存储过程中完成.

I place a high value on the power of expression, and I don't find the SQL space to be all that expressive. Use the best tools you have on hand for the most appropriate tasks. Fiddling with logic and higher order concepts is best done at the highest level. Consequently, storage and mass data manipulation is best done at the server level, probably in stored procedures.

但这要看情况.如果您有多个应用程序与一种存储机制交互,并且您想确保它保持其完整性和工作流,那么您应该将所有逻辑卸载到数据库服务器中.或者,准备好在多个应用程序中管理并发开发.

But it depends. If you have multiple applications interacting with one storage mechanism and you want to make sure it maintains its integrity and workflow, then you should offload all of the logic into the database server. Or, be prepared to manage concurrent development in multiple applications.

这篇关于存储过程中支持/反对业务逻辑的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆