Derby is missing out a lot of functions from the set of functions that other databases usually provide. One example is the TRUNC(value, decimals) function. According to the Wikipedia, truncation can be achieved as such: -- trunc(x, n) CASE WHEN x > 0 THEN floor(power(10, n) * x) / power(10, n) ELSE ceil(power(10, n) * … Continue reading Simulation of TRUNC() in Derby
How to simulate MySQL’s INSERT statement extensions
I have previously posted about the SQL MERGE statement, and how powerful it is here: https://blog.jooq.org/arcane-magic-with-the-sql2003-merge-statement/ Unfortunately, not all databases support this statement. Also, very often it is quite a bit of overkill, when what you want to do is to simply INSERT or UPDATE a single record, depending on whether it already exists. MySQL's … Continue reading How to simulate MySQL’s INSERT statement extensions
ORM vs. SQL, compared to C vs. ASM
History is repeating itself. This is nothing new, but it takes wisdom (and Elephant memory) to remember when and how things had already happened in a similar way. When you feel that the whole SQL versus ORM debate is a bit boring and you may have seen it before, you're probably right. It's another religious … Continue reading ORM vs. SQL, compared to C vs. ASM
jOOQ and Hibernate, a discussion
Starting out from a rather emotional and maybe not really objective comparison between jOOQ and Hibernate, this turned out to be quite an interesting discussion. A must-read for jOOQ and SQL aficionados: http://www.reddit.com/r/java/comments/sk25o/forget_hibernate_jooq_is_byfar_the_best_database/ I personally like this comment here: "You'd be hard-pressed to find a database abstraction layer that can map to SQL better than #jOOQ does, … Continue reading jOOQ and Hibernate, a discussion
jOOQ users’ most frequently used databases
I have recently started an enquiry about which databases jOOQ users are most frequently using. The poll is here: https://blog.jooq.org/which-database-are-you-using-jooq-with/ Of course, such a poll is best analysed using jOOQ's OLAP features. When dumped into a POLL table in our database, we can query the database for the ranking as such: System.out.println( create.select( denseRank().over().orderBy(POLL.VOTES.desc()), POLL.VOTES … Continue reading jOOQ users’ most frequently used databases
Exciting ideas in Java 8: Streams
Brian Goetz's recent post on the State of the Lambda reveils exciting new ideas that are prone to be included in Java 8. One of them is the concept of "Streams" as opposed to "Collections". Using the new Java 8 extension methods, the Iterable interface can be extended compatibly with a lot of "lazy" and … Continue reading Exciting ideas in Java 8: Streams
Must-have Eclipse plugin: AnyEdit Tools
On fresh Eclipse installations, I usually feel a bit naked, until I realise that this lovely little plugin is not part of Eclipse itself. It's called AnyEdit tools, and it features the following nice things: Convert Tabs <-> Spaces Convert: Chars <-> Html entities Convert: Camel <-> Underscores Convert: Capitalize Convert: Invert Case Convert: To Upper Case Convert: To … Continue reading Must-have Eclipse plugin: AnyEdit Tools
jDBI: A simple convenience layer on top of JDBC
I'm always looking out for similar tools like jOOQ, or at least tools that work in the same domain - the domain of database access abstraction. jDBI looks lovely. It provides simple solutions for what JDBC is lacking in general. Here are a couple of features (taken from the intro): Fluent API JDBC is quite … Continue reading jDBI: A simple convenience layer on top of JDBC
jOOQ website re-launch
jOOQ has re-launched its website. Come back to see the new design here: https://www.jooq.org/
SQL tooling, the ranking
When you need to get up and running quickly with your database, the tooling becomes very important. When developing jOOQ and adding integrations for new databases, I really love those ones that provide me with simple ways to create new databases, schemata, users, roles, grants, whatever is needed, using simple dialogs where I can click … Continue reading SQL tooling, the ranking
