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 ...

Get Learning Sinatra now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.