Ruby-on-Rails: Understanding the Basics of Active Record
Ruby on Rails handles data manipulation with the Active Record, which provides an Object Relational Mapping framework. If these sound a little like foreign words to you, keep reading; you'll find that the way RoR handles ORM is a little different, and perhaps easier, than you might see it handled with other languages.
Ruby-on-Rails: Understanding the Basics of Active Record (Page 1 of 4 )
Data and its manipulation is central to any application, whether it is a desktop or web-based application. Data can be represented and manipulated using different techniques.
One of them is the Object Relational Mapping technique or simply ORM. ORM maps the relational tables to the object-oriented classes. ORM frameworks provide the mapping and corresponding object/data manipulation services. In most of the server-side technologies, ORM frameworks constitute a totally different component stack. Hence it becomes the developerís job to do the groundwork to create a connection between the ORM framework and other frameworks (such as web frameworks).
In the context of ORM frameworks, RoR is an exception. The ORM framework is built into the core of RoR in the form of Active Record. In this discussion, the focus will be on the basics of Active Record. The first section will focus on the basics of Active Record. The second section will detail the steps required in connecting the database, and in the third section I will use Active Record along with ActionController and ActionView in an example. So thatís the agenda.