Implementing a generic REDUCE aggregate function with SQL

So, @rotnroll666 nerd sniped me again. Apparently, the Neo4j Cypher query language supports arbitrary reductions, just like any functional collection API, oh say, the JDK Stream API: Stream.of(2, 4, 3, 1, 6, 5) .reduce((i, j) -> i * j) .ifPresent(System.out::println); // Prints 720 SQL doesn't have this, yet it would be very useful to be … Continue reading Implementing a generic REDUCE aggregate function with SQL →

Map Reducing a Set of Values Into a Dynamic SQL UNION Query

Sounds fancy, right? But it's a really nice and reasonable approach to doing dynamic SQL with jOOQ. This blog post is inspired by a Stack Overflow question, where a user wanted to turn a set of values into a dynamic UNION query like this: SELECT T.COL1 FROM T WHERE T.COL2 = 'V1' UNION SELECT T.COL1 … Continue reading Map Reducing a Set of Values Into a Dynamic SQL UNION Query →

“NoSQL” should be called “SQL with alternative storage models”

Time and again, you'll find blog posts like this one here telling you the same "truths" about SQL vs. NoSQL: http://onewebsql.com/blog/no-sql-do-i-really-need-it (OneWebSQL being a competitor of jOOQ, see a previous article for a comparison) Usually, those blogs aim for the same arguments being: Performance ("SQL" can "never" scale as much as "NoSQL") ACID (you don't … Continue reading “NoSQL” should be called “SQL with alternative storage models” →