Part II: Using SQL in Rails

The first section was dedicated to using ActiveRecord for all data access. That works really well for the bulk of what you’ll need to do. As your apps grow and the questions you’ll need to ask of the data get more complex you may begin to find ActiveRecord starts to get in the way or can’t easily do what you need it to do.

In Chapter 5, “Window Functions, Subqueries, and Common Table Expression,” we set the foundation for writing raw SQL and discuss user-defined functions, window functions, subqueries, and Common Table Expression. Don’t worry if you don’t know what those are. You will. We conclude that chapter by building a heatmap to visualize temperatures.

In Chapter 6, “The Chord Diagram,” we create a new Rails ...

Get Data Visualization Toolkit: Using JavaScript, Rails™, and Postgres to Present Data and Geospatial Information now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.