This really is more a learning question than coding, but I am certain it is a common problem for anybody developing administration systems or programs in php/mysql/js etc.

I have developed a significant complex application that allows customers upload images, and define 'hang-outs' inside them with connected actions. The pictures are saved inside a table, and also the actions in another, with json data for each action inside a text area. It is a magazine style format that's utilized by a custom reading through application. However, like I only say, the issue is generic.

Essentially, my fear is when someone is editing exactly the same image and hang of actions simultaneously, plus they both submit changes, or maybe it had been edited by another person plus there is an entire number of structures that potentially will fail on submission.

I'd rather not implement a securing system, because the product is very wide varying (links with other images, etc), and i believe it's a little ugly. I saw this link (MSDN Multi-tenant architecture article) in another question, however it appears just a little overwhelming and specialized for sql server.

So - do you know the terms for data and system architecture here will be able to investigate, or exist good quality articles related to this subject that individuals can suggest? Particularly for php/web world could be great!

First

ALTER TABLE tablename ADD COLUMN changecount BIGINT NOT NULL DEFAULT 0; 

for those relevant tables. Then without notice to submit a big change, use not just

UPDATE tablename SET whatever WHERE id=whatever

but

UPDATE tablename SET whatever, changecount=changecount+1 WHERE id=whatever AND changecount=the_changecount_you_remembered_from_loading_the_object

if a person submits a big change, it'll update the changecount - another user posting a big change towards the same object, but loaded from older condition, could be told "another user just transformed blah blah"