What is the difference between a Rule and a Policy [closed]
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.
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.
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
精彩评论