This workshop will work with a model that should be familiar to most developers. Software repository management inspired by Github funcionality. The goal is not to model in detail the real funcionality but to narrow down some examples that will illustrate useful tecniques.
For the workshop you will need to have installed:
Then just clone the repo and install the bundle:
$ git clone https://github.com/diogob/data-modelling-workshop.git
$ cd data-modelling-workshop && bundle install
$ bundle exec rake db:setup
This Rails project will be used just as a shell to execute migrations.
Keep 2 terminals always open, one in a shell at the project root to execute rake
commands and a second one in a psql
session so you can inspect the database.
In the psql
shell, before starting the tutorial, try the commands \?
and \h
, they will be very handy.
Get acquainted with the relations that were created and the migrations before proceding.
First tip of the tutorial: UUID keys are awesome.
The only files necessary to solve the exercises are migrations that create or alter the database relations, rails models can be omitted. As there is no one right answer for a modelling problem there is no way to automatically verify answers. But an example of solutions are provided in the branch exercises-example-solutions.