Skip to content

sualeh/chinook-database

Repository files navigation

Chinook Database for Java

Chinook database packaged as a jar, for use in Java and with Testcontainers

⭐ Star it ⤴️ if you love it!

About

Chinook Database for Java takes the Chinook database SQL scripts created by Luis Rocha, and packages them as UTF-8 resources in a Java jar file. This jar can be downloaded from The Central Repository for use in Java programs, and for testing using Testcontainers.

Supported database servers

  • Microsoft SQL Server
  • MySQL
  • Oracle
  • PostgreSQL
  • SQLite
  • IBM DB2

How to Use

Use as SQL Scripts

Download the jar from The Central Repository, and unzip using a standard unzip program. The scripts will be in a directory called chinook-database.

Use as Java Resources

Reference the jar file in your Maven or Gradle project, and load the SQL scripts as resources in your program.

Use with Testcontainers

Take a look at the unit tests to see how to create the Chinook database in Testcontainers.

Use as SQLite Database

Download the Chinook SQLite database from the project releases page.

Use as Docker Container

The Chinook database Docker image is published on Docker Hub. You can use this with Docker Compose to create the Chinook database in any container that is running a database. Read How to Quickly Create a Test Database for more information.