April 2019
Beginner to intermediate
244 pages
6h 34m
English
Let’s say we wanted to add a new feature to our MusicDB app that would allow us to add notes to our album records. These notes could be anything like metadata about the album (producer, engineer, and so on), or maybe even our own personal comments.
Our first instinct might be to add a “notes” column to the albums table. But after some consideration, we realize that we’d like to allow each record to have multiple notes, perhaps written by different users. So instead of just adding a column, we decide to create a new notes table, and create a has_many/belongs_to relationship between albums and notes. So far, so good.
But as we think a little further, we realize that we’d like to add notes not just to ...
Read now
Unlock full access