Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try out Flyway + jOOQ #11

Open
KPull opened this issue Mar 25, 2017 · 0 comments
Open

Try out Flyway + jOOQ #11

KPull opened this issue Mar 25, 2017 · 0 comments

Comments

@KPull
Copy link
Member

KPull commented Mar 25, 2017

Description

Let's try out Flyway/jOOQ! We write a simple application which automatically brings its associated database up to date. Then we execute queries to the database using jOOQ using code generated from the framework itself.

Some background:

  • Flyway: Flyway allows applications to manage the schema version of a database. This is important because just like we have version control for code, the same concepts and principles should apply to database schemas. An application can automatically determine whether a database schema needs to be updated and apply any missing schema version automatically.
  • jOOQ: Hibernate is a well-known (massive) leaky abstraction because it tries to force the relational model into an awkward OOP model. An alternative is to write DAOs where a developer writes SQL for all the queries they need in an application (and hence we regain control of the data layer). Unfortunately, this is error prone and not portable across different database vendors. jOOQ allows developers to write type-checked "SQL" in a portable fashion.

Outcome

  • Set up a database using Flyway and schema migrations.
  • Generate jOOQ schema code from the database.
  • Execute queries on the database using jOOQ.

For office use only

  • If you would like to do this exercise add a 👍 reaction to this comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant