- What is a primary key?
- The unique identifier for each row in a table.
- What is a foreign key?
- A reference in one table to the primary key in another table that it shares a relationship with.
- Why would one row of data have both primary and foreign keys?
- When a relationship exists between the tables that requires one table to track a row in another.
- What is Rails' convention for the column name of the primary key?
id
- What is Rails' convention for the column name of a foreign key?
tablename_id
- What are dev, test, and prod databases all about?
- For development, testing, and production, respectively. They allow you to separate code from test, development, and production environments.
- What is the database.yml and how is it used?
- Stores details about the database configuration and environment locations for those databases