'Commit changes to a table once user has finished while storing temporary version (Oracle, Hibernate)

What is a good approach for the design of the following problem with Oracle and Hibernate/JPA given the following constraints:

  • user starts making changes to a table - create, update, delete
  • changes are stored temporarily without saving over original data (only one set of changes exists for one user)
  • the table is locked for edits but original data can be read for other users
  • user eventually commits the changes and "unlocks" table

What I considered:

  • Envers, although I only need a single version
  • temporary tables in Oracle
  • adding an additional column for each existing column (either in same or new table) and saving only changes - this needs manual work and having an operation (create, update, delete)
  • any other alternatives?

Thank you for your design suggestions in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source