title: How to use Put request using Restful API to create and update same record in the database
body: <p>I was asked this question in an interview of late. But I wasn't able to really get my head around how to solve this problem.</p>
  
  <p>The interviewer asked that he wants to use PUT request for both creating and updating a row in the database (totally fine no problem till here). Now the thing is that he wants 2 different clients to send PUT requests to the server, say client (C1) sends a PUT request to create a new row and immediately after that  client (C2) sends a PUT request to update the same row. Now lets assume that C1 sent FirstName:Bob and LastName:Smith when creating a new row in the first place and C2 immediately updated these 2 fields as FirstName:John and LastName:Doe. After all this is done. C1 does a GET request and gets back an unexpected First and Last name. How would you handle this situation so that even after the update is done by C2. C1 still gets the same First and Last Name as Bob Smith rather than John Doe.</p>