业务逻辑:数据库或应用层(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.
更多推荐
发布评论