1

I have a question from an interviewer:

If two users open the same page, one person adding 105 record and another person deleting the same record, what happens in this scenario?

How do I answer this?

1
  • I think, it should 1 person editing record and on the other side anohter person deleting record and when 1 person try to update and it would not.. Commented Dec 1, 2009 at 5:32

2 Answers 2

2

That's a bit odd, as the records would not be there yet to delete if this was simultaneous access. Anywho, I am sure they are looking at Concurrency, and probably Optimistic Concurrency.

Have a look at this page, showing how to implement Optimistic Concurrency with ASP.NET.

Sign up to request clarification or add additional context in comments.

Comments

0

Potential conflicts are resolved in two places. First, on the web tier, using locking to make sure that each request is looking at consistent data.

Second, at the database tier, using transactions.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.