Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java - Web application where same database field gets edited simultaneousty by many users

I am creating a website where a particular field in database is edited simultaneously by many users (assume all the users are making same edit). How can I cope with this? I need only one user to get notified that their edit has successfully done.

like image 512
Devashish Dixit Avatar asked May 13 '26 02:05

Devashish Dixit


1 Answers

Use version number in the table, and check for correct version otherwise throws exception and show the user message that Data was updated and show the latest data

like image 175
jmj Avatar answered May 15 '26 14:05

jmj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!