A binary operation is idempotent if
- for all x:
equivalently, every element is an idempotent element for .
In applications such as databases and transaction processing, idempotent operations are those for which the intended effect is that repeated application should have no effect, such as inserting a record into a file, an element into a set, or sending a message. Implementations must therefore be constructed in such a way that the intended effect is actually carried into practice. For example, messages might have unique sequence numbers with duplicates being discarded on receipt; a set might be implemented as a bit vector, and member insertion implemented by an idempotent mathematical operation such as inclusive or with a bit mask.
When a particular unit of work (i.e., transaction), has the idempotent property, relaxation of the ACID properties usually required for reliable transaction processing, can be relaxed.