Introduction to a Small Application

Learn about a new dataset and how to use it.

We'll cover the following

In this chapter, we’ll write a very basic application where we’re going to compare it by using either the classic application code or SQL to solve some common problems. Our goal in this chapter is to be confronted with managing SQL as part of a codebase and show when to use classic application code or SQL.

Chinook dataset

When we used the Chinook dataset first, it didn’t support PostgreSQL, so we used the SQLite data output, which fits nicely into a small-enough data file. Now, you’ll find a PostgreSQL backup file that you can use. It’s easier to use pgloader, though, so we’ll just do that.

Another advantage of using pgloader is that we get the summary output, which lists tables and how many rows we loaded for each of them. This is the first encounter with our dataset.

Chinook database

Before writing any code or tests or anything, let’s get an introduction to the database.

The Chinook data model represents a digital media store, including tables for artists, albums, media tracks, invoices, and customers.

The cdstore application allows listing useful information and reports on top of the database and provides a way to generate some activity.

Get hands-on with 1200+ tech skills courses.