dalini wrote:
I do exactly this with a seperate table. Nevertheless this is much more unclean (compared to other DBMS).at least, the last oracle version i worked with - does actually the same... they have tables and triggers for this... i mean - how clean is this? ;(... and ibm db4 too if i remeber right... at least behind the 'sequence' commands - so the difference ist quite minimalistic...
Oracle was the first who supports sequences :) PostgreSQL copies the stuff from Oracle. DB2 actually supports sequences.
in mysql you have to do it your own at the moment... yes - so i think maybe one day mysql will provide some standard compilant way for this too, instead of just using autoincrement ;)...
This is what I'm doing actually but I need more than one SQL statement for this today :(
for what is this dummy column? i mean, we don't need/use it, so don't create it ;)
SQL does not allow "insert into abc (keyname) VALUES (NULL)". Perhaps MySQL supports this but I don't like such risks. Therefore I use a column dummy.
all: SEQUENCE_EXIST and SEQUENCE_NEXT are the same commands? for all dbs... - i thought exist checks if an sequence exists? or what does it mean?
Actually yes, but some better database guys than I can implement this with the internal system catalogs.
The problem is that concatenation allows to perform several SQL operations especially inserts in a very efficient way. This is interesting for the batch stuff where we need performance. finally I removed this code from OpenCA::DBI to get better maintainable code.hmm, but maybe the speed would be more importend there? and i don't see a problem between speed and maintable code...
No, no, no. I maintained DBI since it starts and I can only say one thing - clean code is the fastest code. Every code cleanup improved the performance. So unclean stuff is not an option.
Michael -- _______________________________________________________________
Michael Bell Humboldt-Universitaet zu Berlin
Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin _______________________________________________________________
------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ OpenCA-Devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/openca-devel
