Câu hỏi phỏng vấn Ruby on Rails
Câu hỏi

Explain what is ORM (Object-Relationship-Model) in Rails?

Câu trả lời

ORM (Object-Relational Mapping) is a technique used in Rails to interact with a database using Ruby code instead of writing raw SQL queries. Active Record is the ORM framework used in Rails that provides this functionality[1][2].

Active Record maps Ruby classes to database tables, and instances of those classes to rows in the corresponding table[1][2]. It allows you to create, read, update, and delete data in the database using Ruby methods, without having to write SQL statements directly[1].

Some key benefits of using Active Record's ORM in Rails include[1][2]:

  • Abstracting away the differences between different database systems, so you can use Ruby code regardless of the underlying database
  • Providing a more object-oriented way to work with data, ...
entry

entry

Gợi ý câu hỏi phỏng vấn

junior

Explain how you define Instance Variable, Global Variable and Class Variable in Ruby?

expert

Node.js vs Ruby on Rails. Which would you choose?

entry

Mention what is Rails Migration?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào