O'Reilly logo

Jump Start Sinatra by Darren Jones

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 3Collecting Records

In the last chapter, we built a fully functioning website. We covered external views, used the Slim templating engine, and created styles with Sass.

In this chapter, we’ll look at storing some of our data in a database. We will create a Song class and use it to populate a database of songs. We’ll learn how to create, read, update, and delete songs in the database, and then develop a web front end to accomplish this.

Databases

If we are going to build a dynamic website, we need a place to store the page information. A database is for keeping data organized. In a traditional relational database, the data is organized into rows that form tables. Each row represents an item in the database, and each column represents a ...

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