Chinook is a Rails application destined to help you practice various ActiveRecord queries. It is based on this dataset, but translated to work with Rails and ActiveRecord.
Chinook doesn't currently have a user interface, but feel free to add one!
Chinook uses a PostgreSQL database. You'll need to have it installed and running.
Installing PostgreSQL with Homebrew or with the Postgres.app are recommended.
If you're on a Mac and installed the Postgres.app, you might need to add the psql command to bash by inserting the following line into your .bash_profile.
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
Once you've installed PostgreSQL, start by setting up the database by typing the following in your terminal:
rake db:setup
There's a lot of data to load, so instead of using seeds, we're going to manually import a SQL file with Postgres command line. This make take a moment.
psql chinook_development < chinook.sql
Once you're done loading your data, it's time to play! Fire up your Rails Console!
rails console
or for short
rails c
and it should look something like this!
Before attempting the assignment take a moment to familiarize yourself with the tables, columns, and foreign key relationships in your database: