业务逻辑:数据库或应用层(Business Logic: Database or Application Layer)

编程入门 行业动态 更新时间:2024-10-17 18:22:57
业务逻辑:数据库或应用层(Business Logic: Database or Application Layer)

年龄老问题。 你应该把你的业务逻辑放在数据库中作为存储过程(或包),还是在应用程序/中间层? 更重要的是,为什么?

假设数据库的独立性不是目标。

The age old question. Where should you put your business logic, in the database as stored procedures ( or packages ), or in the application/middle tier? And more importantly, Why?

Assume database independence is not a goal.

最满意答案

将足够的业务逻辑放在数据库中,以确保数据一致和正确。

但不要害怕在另一个级别复制这些逻辑,以增强用户体验。

Put enough of the business logic in the database to ensure that the data is consistent and correct.

But don't fear having to duplicate some of this logic at another level to enhance the user experience.

更多推荐

本文发布于:2023-08-04 12:09:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1416033.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:逻辑   应用层   数据库   业务   Business

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!