days
-6
-8
hours
-1
-2
minutes
-5
0
seconds
0
-4
search
Trivial pursuit

How well do you know your jOOQ trivia?

Lukas Eder
Eclipse IDE Jenkins Akka npm MapR GitLab Sauce Labs JavaFX MicroProfile Apache Cassandra NetBeans Theia jOOQ Docker ArangoDB Hyperledger Couchbase Apache Spark JUnit
© Shutterstock / Frazao

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?
a) jock
b) joke
c) juke
d) J-O-O-Q

2. How long does jOOQ exist?
a) Bleeding edge: Both 2018
b) Same as JDBC: 1997
c) A decade: 2008
d) Quite recent: 2013

SEE ALSO: Using JDK 10’s local variable type inference with jOOQ

3. How many committers does jOOQ have?
a) 100s
b) 10s
c) 3
d) 1

4. How many RDBMS does jOOQ support?
a) 80
b) 25
c) 10
d) 10

5. Will jOOQ ever support MongoDB?
a) No
b) No.
c) No.
d) Yes. Just kidding, no.

SEE ALSO: jOOQ 4.0’s new API will use annotations only for truly declarative Java/SQL programming

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?
a) 25000
b) 80000
c) 350000
d) 2000000

Answers

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”.

2. c) A decade: 2008. jOOQ is now almost 10 years old. It was created in 2008 and first surfaced sourceforge in 2009. 2013 was the year when jOOQ was dual licensed into a successful business.

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.

SEE ALSO: Truth first, or why you should mostly implement database first designs

Results

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.

 

Programming Pub Quiz: Have you tried our other pub quizzes? Test your knowledge of other topics!

Author
Lukas Eder
Lukas is a Java and SQL aficionado. He’s the founder and head of R&D at Data Geekery GmbH, the company behind jOOQ, the best way to write SQL in Java.