ABSTRACT

This chapter discovers object-relational mapping on Ruby on Rails, outlines the role of SQL in programming learning about active record basics. To be specific, transactions are protective blocks where SQL statements are only fixed if they can all succeed as one atomic action. The simplest example of such action could be a transfer between two accounts where the users can only have a deposit if the withdrawal succeeded and vice versa. Object-relational mapping in computer science is a programming technique for transmitting data between incompatible type systems with the use of object-oriented programming languages. The result of this, in effect, is the creation of a “virtual object database” that can be accessed from within the programming language. In object-relational Rails data mapping, data-management tasks act on objects that stand as non-scalar values. For instance, consider an address book entry that has a single person along with zero or more phone numbers and zero or more addresses.