O'Reilly logo

Learning Sinatra by Manoj Sehrawat, Sudeep Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Modeling the Backend

In the previous chapter, we discussed the structure of the ToDo application that we will architect. We discussed the structure of the tables in the backend, responsibilities of each module, and views that we will design.

In this chapter, we will discuss the following topics:

  • What Object-relational mapping is
  • When and why should ORM be used
  • How to use ORM for our application

What is Object-relational mapping

For most of the applications that one builds, the choice of the backend application is very important. One may choose any of the SQL-based DBMS such as MySQL, MSSQL, and SQLite or NoSQL-based systems such as MongoDB. For our application, a SQL-based DBMS will work well and we can choose either SQLite or MySQL as they ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required