A Functional Relational Mapping for Scala


Slick is a Functional Relational Mapping (FRM) library for Scala that makes it easy to work with relational databases.

Slick brings the database model to Scala developers so they don't need to write SQL code or struggle with ORMs. We believe that FRM has emerged as the ideal way to talk to a relational database in the functional programming world.

Slick's FRM integrates databases into Scala, allowing relational data to be queried and processed in the same way as in-memory data using ordinary Scala classes and collections. Slick also provides a single unified interface across to manage your project.

This enables full control over when a database access happens and which data is transferred.

  • Work with stored data as if they are normal Scala collections.
  • Retain full control over when a database access happens and which data is transferred.
  • Write your database queries in Scala instead of SQL, thus profiting from the static checking, compile-time safety and compositionality of Scala.

Write database queries in Scala

Because Slick provides a front-end layer that integrates queries transparently using ordinary Scala types, queries can be processed and validated at compile time, even in user-provided database backends. Slick also allows for writing SQL queries, which are executed with an API optimized for Scala instead of using JDBC.

Query and connect with ease

Slick features an extensible query compiler that can generate code for different back-ends. The following database systems are directly supported for type-safe queries (using the query language or Scala code lifted to database queries):

  • Derby/JavaDB
  • H2
  • Microsoft Access
  • MySQL
  • PostgreSQL
  • SQLite
  • DB/2
  • Oracle
  • Microsoft SQL Server


To get started with Slick, we recommend checking out the following resource

Videos & Webinars

Introducing Slick 2.0.0!

Stefan Zeiger, Slick tech lead, leads a webinar about the newly released Slick 2.0. Slick is the most efficient library available for functional programmers connecting applications to relational databases.

Watch Now

Here are some additional ideas on how to get started:

Read the full documentation
Visit the community website
Participate on Stack Overflow
Join the Mailing List
or forums
Contribute at GitHub