Peter Schoenster wrote:

(see below)

Thanks very much for your post. I was thinking about record locking this
morning, as a matter of fact, and couldn't really figure out *why* it would
apply to my situation. AFAIK, all http requests are processed sequentially
(even if a nonosecond apart) and will be queued up, so it would make sense
that MySQL is going to get the commands in a sequence, too.

AFAIK, there's no way that I know of to record lock via the web anyway
(short of *maybe* some ActiveX or Java app): once someone has asked for data
and it's been fed to a web form for modification, the database connection is
lost and at that point, if more than one person has requested the same data
to change, the changes are going to be committed in the order that they are
sent back to the server. I.E. if Joe asks for employee record 12 and Steve
also asks for employee record 12, there's no way for me to say "hey, Steve,
hang on until Joe gets done with his changes, then I'll let you at the
employee 12 record". AFAIK, that's just something I have to deal with when
architecting the options people have to interact with my DB via a browser.

Thanks,
Jack

> On 3 Feb 99, at 22:02, Michael A. Stone wrote:
>
> > i'm afraid there's no way to work around the performance costs
> > for transaction logging and record locking.   they're both
> > designed to prevent database corruption and improve your chances
>
> > the elimination of those features makes MySQL almost a read-only
> > database.   both mechanisms work together to keep two people
> > from trying to write data to the same field at the same time.
> > it's a necessity of life if you want to support multiple,
> > simultaneous writes into the same database.   the MySQL approach
> > is to assume that only one person will be storing information at
> > any give time, but that large numbers of people will want to
> > view that information.

> I assumed that mysql had some protection to assure simultaneous
> requests to update/modify. But I assumed.  Mikes comments made me
> challenge those assumptions and I posted something to the mysql list
> (very active and very rewarding).
>
> I have been assured that simultaneous request to update/modify my
> databases will not result in corruption.  (transactions with committs
> and rollbacks are another story).
>
> Here is part of my email to mysql and the reply by the creator of
> mysql himself:
>
> My questions:
>
> > I wonder how this works with mysql.
> >
> > Imagine I am running a poll.  I have 2 columns:
> >
> > choice | votes
> >
> > What happens if more than one person votes for the same choice
> > at the same time?
> >
> > Will there be a queue? If I do the following:
> >
> > UPDATE $table SET votes=votes+1 WHERE choice = '$f{choice}'
> >
> > and more than one person clicks update at the same time, what
> > will happen?
>  __end of my questions
>
> > Response from creator of MySQL:
>
> > All commands in MySQL are atomic;  The above is safe to use without
> > any problems! This is documented in the MySQL manual;  Search after
> > 'locking'!
> >
> > Mysql came up on another mailing list and someone mentioned
> > that using it for anything other than a "read only" purpose
> > would be like playing Russian Roulette.
> >
> > Which mailing list?  Did the user get any respones to the above?  The
> > above clearly indicates that he doesn't have a clue of what he is
> > talking about, so you can safely ignore him :) The problem is that he
> > probably thinks that one really need transactions to get anything to
> > work, while the truth is that very few applications NEED transactions;
> > In many case transactions just introduce a speed penalty that makes
> > your application useless!
> >
> > Seriously, MySQL has proven itself to be very robust during the 3
> > years it has been publicly available (there has of course been some
> > small disfeatures in some releases, but these has usually been fixed
> > straight away) ; We have got many rewards (check
> > http://www.tcx.se/news.html) and the big user base has helped to get
> > MySQL very throughly tested.
> >
> > MySQL is also quite good documented and has a very active mailing with
> > lots of very helpful people that generously give away free advice.
> >
> > Regards,
> > Monty
> >
>
>
> ____________________________________________________________________
> --------------------------------------------------------------------
>  Join The NEW Web Consultants Association FORUMS and CHAT:
>    Register Today at: http://just4u.com/forums/
> Web Consultants Web Site : http://just4u.com/webconsultants
>    Give the Gift of Life This Year...
>      Just4U Stop Smoking Support forum - helping smokers for
>       over three years-tell a friend: http://just4u.com/forums/
>           To get 500 Banner Ads for FREE
>     go to http://www.linkbuddies.com/start.go?id=111261
> ---------------------------------------------------------------------
>

____________________________________________________________________
--------------------------------------------------------------------
 Join The NEW Web Consultants Association FORUMS and CHAT:
   Register Today at: http://just4u.com/forums/
Web Consultants Web Site : http://just4u.com/webconsultants
   Give the Gift of Life This Year...
     Just4U Stop Smoking Support forum - helping smokers for
      over three years-tell a friend: http://just4u.com/forums/
          To get 500 Banner Ads for FREE
    go to http://www.linkbuddies.com/start.go?id=111261
---------------------------------------------------------------------

Reply via email to