How well do you know your jOOQ trivia?
Our programming trivia series continues with jOOQ! This week, Lukas Eder helps us celebrate the easiest way to write SQL in Java.
It’s time for another programming quiz. Today, we’re testing your knowledge of jOOQ!
jOOQ is a a light database-mapping software library in Java that implements the active record pattern. Lukas Eder, a regular contributor to JAXenter, has helped us out with this quiz.
Answer the following questions, and see how much you know about jOOQ for yourself!
How do you pronounce jOOQ?
2. How long does jOOQ exist?
a) Bleeding edge: Both 2018
b) Same as JDBC: 1997
c) A decade: 2008
d) Quite recent: 2013
3. How many committers does jOOQ have?
4. How many RDBMS does jOOQ support?
5. Will jOOQ ever support MongoDB?
d) Yes. Just kidding, no.
6. Why do jOOQ’s Record types go from Record1 to Record22<T1, T2, …, T22>?
a) Because 8 (like .NET’s tuples) are not enough for SQL
b) Because Lukas was 22 years old when he created jOOQ
c) Because jOOQ is 22 years old
d) Because Scala’s tuples have 22 attributes as well.
e) Because Catch-22
7. How many lines of code is the jOOQ runtime?
1. c) juke. There is absolutely no reason why this should be the preferred pronunciation apart from the fact that this website says so and that Lukas always pronounces it this way. Some people have started having the same fierce arguments as they do with Es-Queue-El (or Sequel)? How do you even pronounce PostgreSQL? By the way. It *is* pronounced “sequel”.
3. d) 1. While there have been individual contributors over the years, jOOQ has only one main committer, and that’s Lukas Eder
4. b) 25. Support for many database vendors has been added over the years. Version 3.11 now supports 25 RDBMS
5. a) No; b) No; c) No; and 4) Yes. Just kidding, no.
6. d) Because Scala’s tuples have 22 attributes as well. Without higher kinded types (that support an additional indirection on their generic type variables, allowing for arbitrary arity type variables), APIs like jOOQ have to stop adding additional type variables at some point. All choices are arbitrary. .NET’s 8 is arbitrary. jOOλ’s 16 is arbitrary. Map.Entry’s 2 is arbitrary. Scala’s 22 is arbitrary. For jOOQ/Scala interoperability purposes, jOOQ chose to mimick Scala here, which is why jOOQ supports type safety up to 22 columns as well (still supporting, but losing type safety for larger rows). Now, the real question is: Why has Scala settled for 22?
7. c) 350000. The jOOQ API has tons of Javadoc and many repeated methods / types because of heavy overloading and tuple type safety for Record1<T1> up to Record22<T1, T2, …, T22> types. There are a total of 670 interfaces, which mostly comprise the DSL API, so among the 350000 lines of code, not all of it is actual code.
How well did you do? Do you know your JOOQ trivia?
0-2 correct: You’re just a beginner.
3-4 correct: You’re pretty solid in your JOOQ trivia, but you still might need to pay a little more attention to the details.
5-6 correct: Nice! You really know your stuff!
7 correct: You are a JOOQ master.