Course
Skills Expanded
Your Database Is Your Friend
Learn how to use your database to make your Ruby on Rails applications rock solid.
What you'll learn
Databases have endured a lot of flak from the Rails camp, but they can do some pretty fantastic things. We can make our software better by spending some time to get to know them. Your database wants to be your friend.
Table of contents
Introduction
3mins
Data Modelling
38mins
- Introduction 1m
- The Unexpected Nil 1m
- Nil versus Empty String 2m
- ActiveRecord Validation 1m
- Not Nil Database Migration 2m
- The Unexpected Nil: Recap 1m
- The Missing Parent 1m
- ActiveRecord has_many options 3m
- Foreign Keys 2m
- Cascading Deletes 1m
- Schema.rb and Foreigner gem 2m
- The Missing Parent: Recap 1m
- Duplicate Data 2m
- Resolving Duplicates 3m
- Retrying Duplicate Exceptions 3m
- One-to-one Relationships 2m
- Duplicate Data: Recap 1m
- Polymorphic Associations 1m
- Converting to Separate Tables 2m
- Reactive Integrity Tests 2m
- Wrapping Up 2m
Concurrency
38mins
- Introduction 1m
- A Development Environment for Concurrency 2m
- Concurrent Requests Primer 2m
- Concurrency and Unique Constraints 2m
- Concurrency and Foreign Keys 1m
- Thinking Concurrently 1m
- Optimistic Locking Introduction 2m
- Optimistic Locking with ActiveRecord 2m
- Counters 1m
- Optimistic Locking Recap 1m
- Pessimistic Locking 3m
- Pessimistic Locking Recap 1m
- Concurrency in the Real World 3m
- Combined Locking Example 6m
- Acts as List 4m
- Isolation Levels 6m
- Summary 2m
Reporting
28mins
Appendix: MySQL
10mins