Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jeneve/09c9f278d96b26ead2b5548dd26696ff to your computer and use it in GitHub Desktop.
Save jeneve/09c9f278d96b26ead2b5548dd26696ff to your computer and use it in GitHub Desktop.
## Models, Databases, Relationships in Rails
#### What is the difference between a primary key and a foreign key? Where would we find a primary key? What would it be called by default? Where would we find a foreign key? What is the naming convention for a foreign key?
#### Write down one example of:
* a `one-to-one `relationship.
* a `one-to-many relationship`.
* a `many-to-many relationship`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment