O'Reilly logo

Scalatra in Action by Stefan Ollinger Dave Hrycyszyn Ross A. Baker

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 10. Working with a database

This chapter covers

  • Working with persistent data in a Scalatra application
  • Introducing the Slick library and integrating it into a Scalatra application
  • Creating a persistence layer using Slick’s table models, queries, and DBIO actions

In this chapter, you’ll work with persistent data in a Scalatra application and use the Slick library. Slick integrates relational databases in the Scala language, providing a type-safe query language.

10.1. Working with a relational database and example scenario

A database is typically used by an application to store persistent data. That way, the data can be efficiently queried, loss of data can be minimized, and scaling the database is possible. The application doesn’t ...

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