Databases in Ruby on Rails: Advanced Concepts

This course is included in our On-demand training solution.


This course covers how to use advanced features to work with Ruby on Rails databases. It covers star schemas, lists and calendar tables, multi-valued dimensions as well as columnar databases. It also covers working with the InnoDB engine as well as managing deadlocks, scan locks and concurrency.

Target Audience

Programmers who want to learn to use advanced features available for working with databases in Ruby on Rails



Expected Duration

60 min.

Course Objectives

Course Introduction

Star Schemas

  • demonstrates the uses of Star Schemas and explain an example showing Fact and Dimension tables
  • Creating a Star Schema

  • up a range of models through the use of a Star Schema
  • Using a Star Schema

  • use a star schema in a Ruby on Rails application for warehouse type queries
  • Acts as Lists

  • represent a child table of objects as an ordered list in Ruby on Rails
  • Calendar Tables

  • use Ruby on Rails to build a Calendar table with multiple fields, and use code to insert data into the table
  • Multi-Valued Dimensions – Creating

  • create a table for multi-valued dimensions in Ruby on Rails
  • Multi-Valued Dimensions – Querying

  • write a query for data stored as multi-valued dimensions in a database in Ruby on Rails
  • Columnar Databases

  • work with a columnar database using Ruby on Rails.
  • Setting Up InnoDB

  • set up the InnoDB engine in Ruby on Rails to support transactions that the default MySQL storage engine otherwise doesn’t support
  • InnoDB Locking

  • work with InnoDB locking in Rails using a transaction and a controller
  • DeadLocks

  • resolve deadlocks when working with databases in Ruby on Rails
  • Scan Locks

  • uses various tools and ways to avoid table scans and negate table locks in Ruby on Rails databases
  • Overview of Concurrency

  • outline ways to efficiently deploy multi-threaded Ruby on Rails applications on a multi-threaded server and a multi-process server.
  • Concurrent Requests

  • fine tune your application to effectively deal with concurrent requests in Ruby on Rails
  • Concurrency and Unique Constraints

  • a unique key constraint and then have the Ruby on Rails model validate it with a couple of simple commands
  • Concurrency and Foreign Keys

  • index a Ruby on Rails database variable as a foreign key
  • Exercise: Creating and Using a Star Schema