Database Applications


This course takes the lessons of LS180 and introduces the concept of working with databases from your applications. We'll build a simple command-line application, then move on to a more advanced database-backed Todo application that uses a high-level relational abstraction library. We'll also talk about how to optimize SQL queries from within your applications.


Programming and Back-end Development


Detailed Syllabus

Interacting with a Database in Code

  • Getting Started
  • Executing SQL Statements from Ruby
  • Project Demo
  • Project Setup
  • Database Design
  • Listing Expenses
  • Displaying Help
  • Adding Expenses
  • Handling Parameters Safely
  • Code Structure
  • Searching Expenses
  • Deleting Expenses
  • Clearing Expenses
  • Counting and Totaling Expenses
  • Creating the Schema Automatically

Database-backed Web Applications

  • Getting Started
  • Project Overview
  • Extracting Session Manipulation Code
  • Designing a Schema
  • Setting up a Database Connection
  • Executing and Logging Database Queries
  • Loading Records From the Database
  • Solving the Reloading Problem
  • Development Configuration
  • Working with Lists
  • Working with Todos