Introduction of ActiveRecord Query Interface
ActiveRecord is the M in MVC which is the layer of the system responsible for representing business data and logic. The technique that connects the rich objects of an application to tables in a relational database management system is Object Relational Mapper(ORM) .
According to the Rails Guide, ActiveRecord Query interface is
ActiveRecord Query Interface ways to retrieve data from the database using Active Record. Active Record will perform queries on the database for you and is compatible with most database systems, including MySQL, MariaDB, PostgreSQL, and SQLite. Regardless of which database system you’re using, the Active Record method format will always be the same.
Active Record Query Interface Related Examples:
List of Methods to Retrieving Objects from the Database.
- find & find_by
- group and count
- where with an array
- ActiveRecord Bang (!) methods
- ActiveRecord case insensitive search
- Get the first and the last record