Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!news.musoftware.de!wum.musoftware.de!feeds.phibee-telecom.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Java daemon Date: Tue, 20 Nov 2012 00:32:20 +0000 (UTC) Organization: UK Free Software Network Lines: 48 Message-ID: References: <50a9568c$0$294$14726298@news.sunsite.dk> <50a98e41$0$287$14726298@news.sunsite.dk> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1353371540 9589 84.45.235.129 (20 Nov 2012 00:32:20 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Tue, 20 Nov 2012 00:32:20 +0000 (UTC) User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Xref: csiph.com comp.lang.java.programmer:19820 On Sun, 18 Nov 2012 20:41:19 -0500, Arne Vajhøj wrote: > On 11/18/2012 8:05 PM, Martin Gregorie wrote: >> On Sun, 18 Nov 2012 16:43:39 -0500, Arne Vajhøj wrote: >>> And most of the non-standard SQL problems went away with MySQL 4.1 and >>> 5.0 back in 2005 and 2006. >>> >> So, you're telling me its now ditched auto-incrementing fields and has >> implemented sequences? > > No. > > But then auto increment is also the standard (with IDENTITY keyword > though). > > And it is also the most widely supported: MySQL, > SQLServer, DB2 etc.. > > PostgreSQL has it in the form of SERIAL (even though it is just > syntactic sugar for a sequence). > > Sequences is really an Oracle and PostgreSQL proprietary thing. > I haven't looked at the SQL standard for quite a while and thought sequences were in it. My bad. I have to say I like sequences a lot better than auto-incrementing fields for one reason: you know what the unique value is before doing the INSERT, which seems cleaner to me that doing the INSERT and then reading the new row to find out what the auto-incremented value is. In fact, for this exact reason I'd prefer do what I've had to do with DBMSs that don't have either sequences of auto-incrementing: namely to 'fake' a sequence by updating a singleton row in a dedicated table rather than use auto-increment. Needless to say, this should also happen within an explicit commitment unit and, of course, ymmv. > MySQL are trying to converge towards standards not away from standards. > I'm pleased to hear it: SQL standards are A Good Thing. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |