For this question, please assume the following:
- I am using MySQL
- I have a Location table: Location(ID, Name, Address, TravelDetails, ...)
- I have an Event table: Event(ID, Name, LocationID, StartTime, ...)
- LocationID is a Foreign Key to Location
- The system is an ASP.NET MVC Web Application
- The system has multiple concurrent users.
Here is an example scenario that explains my confusion:
In my application, I select "Create New Event". I am given a Drop Down List to select a Location. I am shown the Location Name, but the LocationID of the selected item is what is stored in the Event.
While I am creating my Event, someone else opens a Location to edit some of its details. They could change the Location Name and all other details so that the Location is now effectively a completely different Location (basically, the editor created a new Location without deleting the location first). Those changes don't propagate to my Event's Location Drop Down List until I refresh the page, so I don't have the most up-to-date list of Locations.
With the changes made to the Location, the identity of the Location I wanted to use for my Event could be completely different - it might not represent the same Location as it did originally. Now my Event could be completely wrong because the Location is different than I had intended.
My question is this:
How should I handle this? Is this a problem worth worrying about? Who is to blame? Is it my fault as the developer for not locking down fields such as Location Name (but what if there was a typo in the name...?) or implementing safety checks to inform the user if a Location he is trying to use was changed since he started creating his Event? Or is it the fault of the editor for not being "smart" about completely changing the original meaning/purpose of a Location?
I want to assume users will be smart when making edits, but that is always a bad assumption.