Presented by:

No video of the event yet, sorry!

SQL Queries can get large, really, really large. Typically this complexity is attacked using stacked SQL views or ORM frameworks like Hibernate, which both have major limitations. SQL itself has no objects so constructs more abstract than a View are unavailable, making programming graces like polymorphism all but a dream. ORM, on the other hand, comes at the cost of notorious impedance mismatch problems like N+1, which are so disastrous, they require framework-level compromises such as JPQL and EhCache. As a result of these things, ORM has been dubbed the Vietnam of Computer Science. Even if overtake these issues, as we frequently do, the dark reality remains that using Hibernate, we have usually very little idea what queries will run against our database until they break it!

What if there was an alternative? What if there was a way to use an Object Oriented language to construct queries, completely immune to the horrors of N+1? What if using this approach, every query our application will execute was synthesized during compile-time and could even be executed on the spot? These things are not only possible but are the exact feature set of an Open Source framework called Quill which I have proudly been both a user and maintainer of during the past four years. Using functional programming, polymorphism, and some Scala code, we can make big SQL queries sane, maintainable, and even fun!

2019 July 19 05:50
40 min
Philly 2019