We are modifying our post on stackoverflow.
And we only changed the tags part,removed tag1,tag2 and added tag3,tag4.
After pressing the Post Your Question button,these things should be done:
- reduced the
countcolumn fortag1,tag2by 1 - delete the relation between the post and
tag1,tag2 - if
tag3,tag4already exists,increase thecountcolumn of the two by 1;otherwise,insert them to thetagstable withcountvalue 1 - add the relation between the post and
tag3,tag4
Let's take a deep breath and that's all!
I want to see which ORM can approach this most easily/performant no matter it's written in PHP/Java/C/.Net or any language else,because the ideas are similar across languages!