views:

96

answers:

4

Guys, I want to build an e-commerce site on asp.net. My query is: when two users simultaneously buy something, how would the two records get inserted in my database? Would there be a lock? Can anyone explain how this would be or can be handled.

Also, I want to handle peak traffic and also control the average data allotted to each user. I am thinking of using a plug-in. Any suggestions here?

A: 

The RDBMS handles the locking for you.

tomdee
+2  A: 

Just a thought but if your just starting a new online store its highly unlikely you'll run into any problems like this for some time?

Secondly, Databases take care of themselves and your web server does all the work of handling traffic and allocating resources. You shouldn't be doing this at a web code level.

Derek Organ
A: 

Maybe a better solution is a free ecommerce solution, as it'll have a lot of optimisation for large traffic already. Is there a specific reason not to use one of the many solutions already available?

A: 

which are ? have thought of some compression techniques..but still aitn concrete.... how do u control the peak trafic issues and also the average data per user...