Working with Databases in Ruby on Rails


Overview/Description
Target Audience
Prerequisites
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description
This course covers how to work with databases in Ruby on Rails. It covers data models, referential integrity, record validation, and optimistic and pessimistic locking.

Target Audience
Programmers who want to learn work with databases in Ruby on Rails

Prerequisites
None

Expected Duration (hours)
1.7

Lesson Objectives

Working with Databases in Ruby on Rails

  • start the course
  • create and use a basic CRUD in Ruby on Rails
  • create various data models in a Ruby on Rails database
  • implement one-one relationships between two ActiveRecord models
  • link one database in Ruby on Rails to multiple other tables using a has_many relationship
  • use the joins keyword or the includes keyword to query two Ruby on Rails databases that have a has_many relationship
  • up a polymorphic association in Active Record by generating models, declaring the association, and modifying the migrate
  • examine a foreign key for an has_many relationship association in Ruby on Rails
  • manage foreign keys in Ruby on Rails databases
  • ensure referential integrity in Ruby on Rails databases
  • identify the three main reasons duplicate data might be added to a Ruby on Rails database
  • resolve duplication in a Ruby on Rails database by writing a validation rule in the model, as well as by adding an index to the database
  • recap on how avoid duplication in Ruby on Rails databases and use the Consistency Fail gem
  • add validation rules to the ActiveRecord in a Ruby on Rails database
  • handle invalid data in a Ruby on Rails database
  • migrate a not_null database in Ruby on Rails
  • outline the difference between an empty string and a nil value in Ruby on Rails
  • overview how to implement optimistic locking in a Rails application
  • implement optimistic locking in a Rails application
  • use the internal counter with Optimistic Locking in Ruby on Rails
  • review the implementation of optimistic locking in a Rails application
  • overview pessimistic locking and the different types of pessimistic locks you can have in Ruby on Rails
  • implement optimistic locking in a Rails application
  • review the implementation of pessimistic locking in a Rails application
  • make decisions involving basic database concepts in a Ruby on Rails application
  • Course Number:
    pg_rubr_a04_it_enus

    Expertise Level
    Intermediate