规则和政策有什么区别

发布于 2024-10-14 08:28:24 字数 180 浏览 11 评论 0原文

在数据库环境中,我们有时需要根据一些语句检查值,例如“客户名称非空”“购买的客户数量为正” ……

但是这样的言论构成规则或政策吗?

一般来说,您如何定义这些概念、它们的区别和关系?

提前致谢。

in the context of a database, we sometimes need to check values against some statements like "the customer name is non-empty" or "the customer number of purchases is positive"...

But do such statements constitute rules or policies ?

In general how would you define these concepts, their differences and relations ?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陈年往事 2024-10-21 08:28:24

我想我知道你在说什么;我以前遇到过这样的区别(尽管英语单词并没有那么不同),以下是我认为它在大多数商业计算领域中的表现。

在这种背景下的规则——无论是结构性事实还是商业强加的声明——都不会改变,或者至少改变的可能性很小。大多数“X 不能为空”形式的语句都代表规则。 “Null”对于业务用户来说通常没有多大意义;通常,您通过检查模型的构建方式来得出这些规则。规则的更改会对数据库和任何支持应用程序的构建方式产生深远的影响。

政策更像是业务指令。优惠客户享受 10% 折扣可能是一项政策,但如您所知,此类情况往往会发生变化。策略的更改可能会影响应用程序的工作方式,但不会影响其基本架构或基础。

务实地说——听起来你可能已经知道这一点——你想让政策相对容易改变。规则虽然可能会发生变化,但通常会涉及更多内容:更改规则通常需要更改代码、UI、心智模型、思维方式等。

我希望这有帮助。

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.

伪装你 2024-10-21 08:28:24

在数据库的上下文中,我认为拥有用户名是一条规则,而它是一项政策(可能被行政或其他批准覆盖),允许客户在少于设定数量的情况下获得较低的指定折扣购买。

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.

规则是由验证支持的面向外部的声明。政策是有结果支持的内部规则。

这可能是一项政策,以后用户可以更改用户名(取决于软件的编写方式),或者可以调整注册时分配的折扣和运费以创造客户机会。

据我估计,规则需要严格验证,而政策本质上会受到干预和/或操纵。

HTH

贾里德

In the context of a database, I would argue that it's a rule to have a username, while it's a policy (potentially overridden by administrative or other approval) to allow customers to have a lower assigned discount if they have less than a set number of purchases.

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.

Rules are outward-facing statements backed by validation. Policies are internal rules backed by consequence.

It could be a policy that later on down the road, a user can change a username (depending on how the software was written), or that the discount and shipping rates assigned on signup may be adjusted to create customer opportunities.

In my estimation then, a rule requires hard validation, while a policy by nature is subject to intervention and/or manipulation.

HTH

Jared

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文