At a customer site, I've recently encountered a report where a programmer needed to count quite a bit of stuff from a single table. The counts all differed in the way they used specific predicates. The report looked roughly like this (as always, I'm using the Sakila database for illustration): -- Total number of films … Continue reading How to Calculate Multiple Aggregate Functions in a Single Query
A very interesting talk about the future of DBMS was recently given at EPFL by MIT Professor and VoltDB Co-founder and CTO Michael Stonebraker, who also gave us Ingres and Postgres. In a bit less than one hour, he explains his views with respect to the three main pillars of database management systems: OLAP / Data warehouses … Continue reading MIT Prof. Michael Stonebraker: “The Traditional RDBMS Wisdom is All Wrong”
A very nice little rant on Hibernate: http://jeffkemponoracle.com/2011/11/25/3-reasons-to-hate-hibernate While I don't agree 100% (e.g. CRUD/OLTP really is different from OLAP, and Hibernate is a strong CRUD tool), I certainly share most of his feelings.
Every now and then, you come across a requirement that will bring you to your SQL limits. Many of us probably give up early and calculate stuff in Java / [or your language]. Instead, it might've been so easy and fast to do with SQL. If you're working with an advanced database, such as DB2, … Continue reading GROUP BY ROLLUP / CUBE