Back to Developer Roadmap

Raw SQL in Active Record

src/data/roadmaps/ruby-on-rails/content/[email protected]

4.0714 B
Original Source

Raw SQL in Active Record

Active Record typically provides an abstraction layer for database interactions, allowing you to work with objects and methods instead of writing SQL queries directly. However, sometimes you need more control or access to database-specific features. Raw SQL allows you to bypass Active Record's abstraction and execute SQL queries directly against your database, giving you the flexibility to perform complex operations or optimize performance in specific scenarios.

Visit the following resources to learn more: