Prev: how to record screen acrtions programatically?
Next: Build A Home Internet Business For Extra Income Stream
From: Arne Vajhøj on 6 Apr 2010 20:23 On 06-04-2010 07:17, Paul Cager wrote: > On Apr 5, 1:31 am, Arne Vajh�j<a...(a)vajhoej.dk> wrote: >> On 04-04-2010 20:02, Tom Anderson wrote: >>> Ubuntu decided to make Derby a separate package. Digging around in my >>> package info, it seems that this is still the case, and i don't have it >>> installed. And that i can't install it through the package manager, >>> because of some funky Ubunutu version conflict lameness. Oh joy. >> >> That is pretty nasty of them. People that have installed Java expect >> to have a complete Java. > > My guess is that it is more likely to be a mistake than malice. Could very well be the case. Arne
From: Arne Vajhøj on 6 Apr 2010 20:27 On 05-04-2010 09:15, Tom Anderson wrote: > On Sun, 4 Apr 2010, Arne Vajh?j wrote: > >> On 04-04-2010 20:02, Tom Anderson wrote: >>> See my response to Mark. There's still no sign of Derby on my machine. >>> My reason was apparently valid. >>> >>> According to this rather antique blog post: >>> >>> http://blogs.sun.com/FrancoisOrsini/entry/ubuntu_users_gets_java_db >>> >>> Ubuntu decided to make Derby a separate package. Digging around in my >>> package info, it seems that this is still the case, and i don't have it >>> installed. And that i can't install it through the package manager, >>> because of some funky Ubunutu version conflict lameness. Oh joy. >> >> That is pretty nasty of them. People that have installed Java expect >> to have a complete Java. >> >> I don't think SUN should have bundled Derby, but they did and >> tampering with the Java distribution is just bad. > > Strongly agreed. I want to use Java, not DebianJava. I don't want to > have to go and start a thread on a newsgroup to double-check the fact > that something that should work doesn't. Now i've wasted you guys' time > as well as my own! > >> It may even be a violation of the license and/or trademark. > > I doubt that - neither Debian nor Ubuntu are that stupid. If Java DB is considered part of Java, then shipping a "Java" without it would be a violation of license/trademark/whatever. MS paid 20M$ for that. SUN/Oracle would probably not be agressive against Debian/Ubuntu. And Debian/Ubuntu would probbaly fix it right away if notified. Arne
From: Arne Vajhøj on 6 Apr 2010 22:43 On 05-04-2010 10:09, Tom Anderson wrote: > On Sun, 4 Apr 2010, Arne Vajh?j wrote: > >> On 04-04-2010 20:12, Lew wrote: >>> I hear good things about H2. >> >> ;ALLOW_LITERALS=NONE in the connection URL certainly is nice ! > > H2 supports the rather useful MERGE INTO command, which apart from the > first word looks identical to INSERT INTO, and means something like > "INSERT INTO unless a row with that primary key already exists, in which > case UPDATE". This is useful for implementing something with semantics > like Map.put, where a put can either create a new record or replace an > old one. > > I thought this was actually standard, since SQL:2003 defines a MERGE > INTO command, but on looking more closely, i see that SQL:2003's version > is different, being more complicated and less useful. H2's version isn't > even a minimal subset of the SQL:2003 one, AFAICT. In H2, i say: > > MERGE INTO table (key, value) VALUES (?, ?) > > Whereas in SQL:2003 (as realised by Oracle, at least), i'd have to say: > > MERGE INTO table USING table > ON (key = ?) > WHEN MATCHED THEN UPDATE SET value = ? > WHEN NOT MATCHED THEN INSERT (key, value) VALUES (?, ?) > > And i'd have to give my key and value twice in the parameters, unless i > wanted to use some kind of nonstandard (?) variable mechanism inside the > query. The SQL:2003 version is much more flexible, of course, and there > are all sorts of extra conditions you can add to it. > > MySQL has yet another syntax for this, which looks like: > > INSERT INTO table (key, value) VALUES (?, ?) > ON DUPLICATE KEY UPDATE value = VALUES(value) > > As far as i can see, Derby has no way to do insert-or-update in a single > query. > > Anyway, argh, looks like i'm going to have to add a facility for > database-specific SQL for the insert operation if i want this to be > portable. I'd really like to avoid having to fall back to running > multiple queries to probe the database for the existence of the key and > then do UPDATE or INSERT accordingly. Given the maintenance work of adding a specific SQL statement for every new database wouldn't it just be easier to make two statements? Especially with a high update ratio then an UPDATE with a WHERE and only an INSERT if no rows were updated could be worth considering. Anyway the cost should not be so bad, because the first of the two statements should get the relevant pages loaded in memory so the second should be fast. Arne
From: Wayne on 6 Apr 2010 23:30 Lew wrote: > Lew wrote: >>>> I just now downloaded the Windows 32-bit JDK SE 6u19 installation >>>> program, but I don't have Windows 7. Still, it's the same >>>> installation program so I suspect the conclusion I draw is valid. >>>> >>>> The installation program after you accept the license displays a >>>> dialog that lets you alter installation directories for the Java >>>> components. It lists five components, the fifth of which is called >>>> "Java DB". The default directory for that component is "C:\Program >>>> Files\Sun\JavaDB". (I routinely change that.) I don't know how you >>>> could have missed it. > > Wayne wrote: >>> Where did you download the installer from? JavaDB no longer shows in >>> the one I used from <http://java.sun.com/javase/downloads/index.jsp>. >>> It *used* to show, as you say. But it doesn't show for me! > > That's the place whence I got the download. > >>> I'm wondering if this doesn't appear because I have a 64-bit >>> computer? I've tried installing the 64 bit Java but that broke other >>> things, so I install the 32 bit version. This works fine, but no >>> JavaDB appears in the installer. It didn't appear in the Add/Remove >>> Programs list after installing the JDK. >>> >>> Very strange. Just a follow-up: I copied the installer I used, to a Windows XP 32-bit host at work, and ran it there. It does show JavaDB! But it doesn't when run on my home system! So, my best guess is that the installer is examining the system for JavaDB compatibility, doesn't like what it sees, and doesn't offer to install it. Either that, or I have a broken (or virus-infected) system at home. I never did like the JDK installer. -- Wayne
From: Thomas Pornin on 7 Apr 2010 08:40
According to Arne Vajh�j <arne(a)vajhoej.dk>: > If Java DB is considered part of Java It is not. It is all in the "org.apache.derby" namespace, and is not part of what a JRE must provide to be entitled to use the name "Java". There are such a few utility components which are provided with Sun's JRE while not being part of "Java" per se; another example is the HTTP server code, in com.sun.net.httpserver. --Thomas Pornin |