在数据库的上下文中,我们有时需要根据“客户名称非空”或“购买的客户数量为正数”等语句检查值......
但这样的声明是否构成规则或政策?
一般来说,您如何定义这些概念、它们的区别和关系?
提前致谢。
I think I know what you're talking about; I've run into such distinctions before (even though the English words are not all that different) and here is how I think it plays out in most business computing areas.
A rule in such a context is something that--whether it's a structural fact or a business-imposed statement--will not change, or at least stands only a very small chance of changing. Most statements of the form "X cannot be null" represent rules. "Null" typically doesn't make much sense to a business user; usually you arrive at these rules by examining the way that your model is constructed. A change to a rule has far-reaching consequences to the way that your database and any supporting applications are built.
A policy is more like a business instruction. Preferred customers get 10% off may be a policy, but as you know, things like this tend to change. A change to a policy may impact the way your application works, but not its fundamental architecture or underpinnings.
Pragmatically speaking--and it sounds like you may already know this--you want to make policies relatively easy to change. Rules, while they may change, are typically more involved: changing a rule often requires changing code, UIs, mental models, ways of thought, and so on.
I hope this helps.
在数据库的上下文中,我认为拥有用户名是一项规则,而它是一项政策(可能会被行政或其他批准覆盖),如果客户拥有的数量少于设定的数量,则允许他们获得较低的分配折扣购买。
Rule: All users must have a username.
Rule: All users must have a password.
Rule: All users must have a valid email address.
Rule: All users must have a valid credit card on file.
Policy: All users begin with a 0% discount rate on purchases.
Policy: All users are required to pay for shipping.
规则是由验证支持的面向外部的声明。政策是由后果支持的内部规则。
这可能是一项政策,以后用户可以更改用户名(取决于软件的编写方式),或者可以调整注册时分配的折扣和运费以创造客户机会。
据我估计,规则需要严格验证,而政策本质上会受到干预和/或操纵。
高温高压
贾里德