Sleepycats Impact on Java
Will this pure-Java, open-source database herald the start of more Java development? Sure, this brings Berkeley DB to the hands of Java developers. It probably will make people reconsider the use of a relational database where simple data structures suffice. Im sure many projects have gotten unnecessarily complex by using an RDBMS when they could have gotten away with using Berkeley DB JE. Tell me some of the benefits of switching to a pure-Java database from a relational database. How do setup, data import speed, performance and disk storage compare?I see going the JE route, if you can, [to be] advantageous, in that it reduces the need for an extra tier while keeping access to large sets of data fast. So, if you have a small database design with just a few tables, with only canned queries, it might be best to go JE. A pure-Java version of JE is better to use over the C-based version with the JNI interface because of performance hits incurred while copying data between Java and C. 1) Setup: Its easier to set up JE than an RDBMS but harder to build the database, so there is a clear tradeoff here. 2) Data import speed: This is totally dependent on your database design and the nature of your data but should be similar across JE and relational databases. 3) Performance: JE will be much faster without an extra SQL compiler and interpret as well as an optimizer. Basically, an RDBMS analyzes every SQL to optimize it and compiles it into another format that is faster for conducting a search. Then, it actually conducts the search. This is removed with a JE application as an overhead, considerably speeding up an application. Further, more databases are usually accessed using client-server, so there is network latency, etc., which robs it of performance. 4) Storage: An RDBMS is far better suited toward storing data and storing it more cheaplyefficientlythan something like JE. Databases have another entire layer to handle storage-related issues, whereas JE is very primitive using a log file. Editors Note: In the initial version of this story, Alex Karasulu incorrectly mentioned what Berkeley DB Java Edition supports. It in fact supports only J2SE and J2EE. Check out eWEEK.coms Database Center at http://database.eweek.com for the latest database news, reviews and analysis.
More than going Java, its hand-rolling a database rather than using a relational one that makes the difference. Java is just a language, but its better for those writing Java applications to use rather than the JNI interfaces to C-based APIs.