Article · Wikipedia archive · Last revised Jun 2, 2026

Unit of work

A unit of work is a behavioral pattern in software development. Martin Fowler has defined it as everything one does during a business transaction which can affect the database. When the unit of work is finished, it will provide everything that needs to be done to change the database as a result of the work.

Last revised
Jun 2, 2026
Read time
≈ 1 min
Length
219 w
Citations
8
Source

A unit of work1 is a behavioral pattern in software development. Martin Fowler has defined it as everything one does during a business transaction which can affect the database.2 When the unit of work is finished, it will provide everything that needs to be done to change the database as a result of the work.2

A unit of work encapsulates one or more code repositories[de] and a list of actions to be performed which are necessary for the successful implementation of self-contained and consistent data change. A unit of work is also responsible for handling concurrency issues,34 and can be used for transactions34 and stability patterns.[de]5

See also

See also

  • ACID (atomicity, consistency, isolation, durability), a set of properties of database transactions
  • Database transaction, a unit of work within a database management system
  • Equi-join, a type of join where only equal signs are used in the join predicate
  • Lossless join decomposition, decomposition of a relation such that a natural join of the resulting relations yields back the original relation
References

References

  1. Martin Fowler. Patterns of Enterprise Application Architecture. ISBN 0-321-12742-0.
  2. Martin Fowler (2002), Patterns of Enterprise Application Architecture, Amsterdam: Addison-Wesley-Longman, ISBN 0-321-12742-0
  3. Martin Fowler. "Unit of Work". Retrieved 2018-03-08.
  4. "Unit of Work". Portland Pattern Repository. Retrieved 2018-03-08.
  5. Michael T. Nygard (2007), Release It! Design and Deploy Production-Ready Software, O’Reilly, ISBN 978-0-9787392-1-8