3 Reasons why It’s Okay to Stick with SQL

The past decade has been an extremely exciting one in all matters related to data. We have had: An ever increasing amount of data produced by social media (once called “Web 2.0”) An ever increasing amount of data produced by devices (a.k.a. the Internet of Things) An ever increasing amount of database vendors that explore … Continue reading 3 Reasons why It’s Okay to Stick with SQL

Stop Claiming that you’re Using a Schemaless Database

One of MongoDB's arguments when evangelising MongoDB is the fact that MongoDB is a "schemaless" database: Why Schemaless?MongoDB is a JSON-style data store. The documents stored in the database can have varying sets of fields, with different types for each field. And that's true. But it doesn't mean that there is no schema. There are … Continue reading Stop Claiming that you’re Using a Schemaless Database

Frightening Facts about MySQL

So you might've seen Destroy all Software's talk about JavaScript: Here's a similar talk (less funny more scary) about MySQL: https://www.youtube.com/watch?v=emgJtr9tIME

What you Didn’t Know About JDBC Batch

In our previous blog post "10 Common Mistakes Java Developers Make When Writing SQL", we have made a point about batching being important when inserting large data sets. In most databases and with most JDBC drivers, you can get a significant performance improvement when running a single prepared statement in batch mode as such: PreparedStatement … Continue reading What you Didn’t Know About JDBC Batch

Do You View Database Applications as Military Campaigns?

Military Campaigns?? Haha. Let's meet Capt. DBA, mastering Sun Tsu's Art of SQL: http://de.scribd.com/doc/15490992/The-Art-of-SQL Citing from the book cover: Do you view database applications as military campaigns? Do you see data as row upon row upon row of enemy columns to be winnowed down and slashed away? [sic!] SQL veteran Stéphane Faroult does. This is … Continue reading Do You View Database Applications as Military Campaigns?

PostgreSQL 9.3 Released!

A great database has just gotten better. PostgreSQL 9.3 has been released today. While improved reliability and availability is certainly quite a thrilling addition, from the jOOQ perspective, the most interesting features are new SQL syntax elements. These include: Better support for JSON LATERAL JOIN (or as SQL:1999 calls it: lateral derived table) Materialised views … Continue reading PostgreSQL 9.3 Released!

The Myth About Slow SQL JOIN Operations

In my recent SQL work for a large Swiss bank, I have maintained nested database view monsters whose unnested SQL code amounted up to 5k lines of code, joining the same table over and over again in separate subselects combined via UNION operations. This monster performed in way under 50ms, no matter how we queried … Continue reading The Myth About Slow SQL JOIN Operations

MySQL Bad Idea #573

This is MySQL's Bad Idea #573 (after #384, which I've blogged about before) I've just had a terrible experience with a bug report from the jOOQ User Group, related to escaping of backslashes in string literals in MySQL. First, I thought to myself, whatever. SQL doesn't escape backslashes. The only escape character within a string … Continue reading MySQL Bad Idea #573

10 Common Mistakes Java Developers Make when Writing SQL

This article is part of a series. You might also like: 10 More Common Mistakes Java Developers Make when Writing SQLYet Another 10 Common Mistakes Java Developers Make When Writing SQL Java developers mix object-oriented thinking with imperative thinking, depending on their levels of: Skill (anyone can code imperatively)Dogma (some use the "Pattern-Pattern", i.e. the … Continue reading 10 Common Mistakes Java Developers Make when Writing SQL

10 Things in SQL Server Which Don’t Work as Expected

So far, I have been blogging about curious RDBMS caveats mostly related to Oracle and MySQL databases. Some examples: You never stop learning about Oracle features NOT IN vs. NOT EXISTS vs. LEFT JOIN / IS NULL: MySQL SQL incompatibilities: NOT IN and NULL values MySQL Bad Idea #384 But there are also other databases, … Continue reading 10 Things in SQL Server Which Don’t Work as Expected