TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:15201] Linux DBMS





> -----Original Message-----
> From:	Carl Wilhelm Soderstrom [SMTP:carls@agritech.com]
> Sent:	Monday, March 27, 2000 1:46 PM
> To:	tclug-list@mn-linux.org
> Subject:	Re: [TCLUG:15201] Linux DBMS
> 
> Chewie wrote:
> >PostgreSQL is known for its stability and a particularly important
> >selling point is it's support for transactions; something that MySQL does
> not
> >have and may not have in the future.
>         actually, I belive there was an article in Linux Journal a few
> months ago, about MySQL, which stated that there *is* a patch to give
> MySQL
> transaction capability.
>         however, it's not popular, and hasn't been merged into the main
> source tree. if you really want transactions, go for a different dbase.
> MySQL's strength is speed and simplicty; let others do the fancy stuff. :)
	[Schlough, Mark]  
	When you say fancy stuff, I'm assuming you are speaking of something
outside of the you basic select / insert / update statements. 

	If you are doing updates to tables, and have any joins on them, I
believe you are locking not only the table you are updating but the tables
that the join touches as well.  During this time period, the table is
locked.   It would seem that without a body of external supplementary code,
MySQL would encounter a bottleneck after only a few users trying to update a
couple of rows.

>         my understanding is that transactions (as opposed to table
> locking,
> which MySQL does),
	[Schlough, Mark]  
	I think you are confusing row-level locking and transactions.
Row-level locking means that when a row is being updated by user_a, then any
other row can be updated by any other user.  

	Transations, are like this.... Think of going to the bank to find
out how little money you have.  You then transfer a measly ten bucks from
checking into savings, 'cause that's all you'll have left because your wife
went on a spree :-)  .....   

	pseudo code....

	START TRANSACTION..

	get current balance in checking
	withdraw $10 from checking
	verify new balance in checking

	get current balance from savings
	deposit $10 into savings
	get current balance from savings

	END TRANSCATION


	If the last portion of the code fails, then the entire transaction
can be rolled back, and you can start over.  Without transactions, you are
left at the step where the job failed.

	This is really nifty stuff, and enables you to keep your data
encapsulated in the database rather then using an external source to manage
what happened where.


>  are more valuable in situations where many users are
> writing to the same table simultaneously. this is probably not that
> important in small websites; nor in small offices (M$ Access uses table
> locking, AFAIK).
	[Schlough, Mark]  
	I believe you are correct.  MS Abcess uses Table-Level locking.  
	I'm wondering if you are speaking of small websites in terms of
small content size or small userbase size.  



> of course, I could be wrong.
	[Schlough, Mark]  

	As could I (^_^)

	Cheers,

	Mark