A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
Java will contain a fully functional database starting with the the Sun JDK for Java SE 6 (a.k.a. Mustang). I have never used Derby (or Cloudscape) for that matter. As anyone here used this DBMS? For what, and what did you think of it?
To head off some of the "why did they bundle it" questions, here some of the key benefits as copied from a David Van Couvering's (Sun employee blog) are:
-Support for latest JDBC spec
-J2EE Compliant database
-Strong SQL standard support
-Strong developer community
-Stable (since 1998 as Cloudscape)
Derby has bindings to ODBC, PHP, Perl, and Python, and of course, any certified JVM (Java). Some people think Sun is making a mistake with this bundling, but that is a different topic. This question is about the database itself, specifically your experience and opinion.
Tuesday, February 13, 2007
I suspect they did so because people write more Servlets and JSP than any other single category, with the possible exception of the mobile stuff. With that thought in mind, including Derby means one less thing to download and install, and by extension, it should be easier for Sun to compete with .NET in the university courses.
However, there are a lot of applications that don't require a database. I'm ok with Sun including Derby as long as it's easy and convenient to exclude it when I distribute copies of the JRE.
Tuesday, February 13, 2007
From what I understand, it is in the JDK but will not be in the JRE.
Tuesday, February 13, 2007
It might be a fabulous boon for testing.
Right now, my unit tests are divided into two chucks: tests that don't need a database, and the very, very, slow ones.
Guess which ones get run more often.
Abstracting access to the database lets me inject a mock data access layer, and that works decently well, but I'd throw it away in a second if I could run all my tests against a really solid embedded database.
(I know there are some in-memory databases around now, but every time I try to set something up, I end up deciding that it's just slightly more trouble than it's worth.)
I've heard that it doesn't perform very well. Take that with a grain of salt, cuz I haven't used it, but that's what I've heard.
I do remember reading an article about it, though, a few years ago when it was still an Apache project.
For each SQL query, they'd dynamically generate Java bytecode to execute the query. The theory was that, when the query was repeatedly executed, the hotspot compiler would swoop in from the sky and optimize the hell out of it. Unfortunately, hotspot wasn't implemented with query-optimizing in mind, so it doesn't do a very good job of it.
At least that's what I've heard. And googling for JavaDB (or "derby") benchmarks seems to confirm the rumor.
Wednesday, February 14, 2007
A company I was involved with licensed Cloudscape pretty early on - probably was sometime in '98.
From what I remember performance wasn't too bad but it seeemed to suffer from periods where it would lock up entirely for a few minutes during application startup.
Having said that, its probably got better since then ;-)
Why is everyone so excited about the fact that Derby will now be bundled with the JDK? How much trouble is it to download it if you need it? I am reminded of how much time I spent solving problems caused by Sun bundling Xerces and Xalan. We were dependent on some features/bugfixes in a more recent release and had to ensure that the new jars were one the bootclasspath of every VM invocation including those of our app servers. Developers doing unit testing would forget and waste time solving bugs that had already been solved.
I understand the college course argument, but I don't think that experienced Java developers will benefit much from having Derby bundled. It's just another set of version collisions waiting to happen. And for technical leads, it's yet another dependency that one must control. Did some contractor (I am one, btw) use some utility class that's part of derby? It's hard to tell when you can't just check your classpath and IDE dependency graphs to maintain control.
Note that I'm not against Derby. In fact, I think it's pretty cool that there's a reasonably performant, all-Java db out there. But, couldn't Sun have solved the student/beginner problem by creating a single downloadable add-on containing xalan, xerces, derby, a small web server, etc.? They could even bundle it with a special version of the jdk for beginners. It's not like they haven't felt compelled to bundle Netbeans with the JDK for a special release.
I haven't been following Java 6 closely, so I haven't had time yet to get particularly excited about anything, but including a database makes me hope for two things:
1. Someone else will do all the work of selecting the best of the embeddable database with a generous license, and
2. A great deal of tender loving care will be put into this one product, both before and after release, which will make it even easier to use.
The version clash argument is interesting, though I've never run into it in practice, even when developing with team members and production servers who may only be using the same OS by coincidence. I'm tempted to credit Ant fot taking care of all that, but it may just be luck.
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz