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 ...
Get Scalatra in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.