Re: DB Sequences

From: Date: Wed, 17 Jul 2002 16:48:16 +0000
Subject: Re: DB Sequences
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1913@lists.php.net to get a copy of this message
Alan Morey wrote: > > For MySQL (maybe others) sequence emulation, why create a new table for > each sequence? Would it not be more efficient to create one table say > "PEAR_Sequences" with 2 columns "sequence_name" and "sequence_id" > and just > add rows to the table for each sequence as it is needed, it would allow > MySQL users with privileges for only INSERT, UPDATE, DELETE and SELECT to use > sequences without needing CREATE privileges if the sequence did not exist, > altough they would have had to create the table in the first place :) > It would also look a bit more tidy when you don't have a sequence table for > every table in your DB. > Maybe the table approach is more efficient? I don't > know, it's just an idea and I was just curious as to the reasons for > using tables. > http://vulcanonet.com/soft/?pack=pear_tut#ss3.6 Tomas V.V.Cox

« previous php.pear.general (#1913) next »