Preventing two users or more from overwriting each other

Hello, I have an inquiry for the community.
Is there a method to stop two users from overwriting each other's data when they are using the app simultaneously?

For more context, each booking in our system is prepared with a unique booking ID; nonetheless, if two users are using the app and If more than one person fills out the form at once, their data will clash and be overwritten. When this happens, one of the items from the users who book both at once will be combined with the other.
(For extra information, this is a inventory management system)

Solved Solved
0 2 181
1 ACCEPTED SOLUTION

The solution is to follow the correct design rules for a multi-user centralized database setup. Whenever you have a single record that can be updated by more than one user (or more than one process), you should then NEVER allow this record to be edited directly by any user (or process). 

You should instead put a change-request process in place. That's is each user would submit a change request to the relevant record. These change requests would then be queued in a dedicated table and processed by a bot that enforces rules like priority, precedence and conflict resolution.

View solution in original post

2 REPLIES 2

The solution is to follow the correct design rules for a multi-user centralized database setup. Whenever you have a single record that can be updated by more than one user (or more than one process), you should then NEVER allow this record to be edited directly by any user (or process). 

You should instead put a change-request process in place. That's is each user would submit a change request to the relevant record. These change requests would then be queued in a dedicated table and processed by a bot that enforces rules like priority, precedence and conflict resolution.

Thank you for the helpful reply - How do you put in place a change-request process?

Top Labels in this Space