I had an interview sterday. interviewer asked me a question.
A person "A" books a fligth ticket form 7 steps. while he goes to the first step, he got a message saying one seat is available. he has entered from step 1 till 7 giving his credit card details and all. the question is at the same time if another person "B" with high internet speed conn is trying to book the same ticket. that should be avoided. as soon as the person "A" starts the step 1 till he completes all the steps , none of them shud be able to access the ticket. it should be bocked by the person "A".
my answer was locking the transation from step 1to step7 at the database level. is that correct.
Can any one suggest me with the proper answer.