Typesafe has announced the Scala Language Integrated Connection Kit (Slick). Slick provides a framework for Scala programmers to connect to databases (both relational and NoSQL) and other data sources. It integrates databases into Scala, allowing stored and remote data to be queried and processed in the same way as in-memory data using ordinary Scala classes and collections. This enables full control of database access and data transfer.
NOTE: As an aide-mémoir for those not using the Scala general-purpose programming language, Scala seeks to integrate features of object-oriented and functional languages, so that code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application.
Slick provides a front-end layer that integrates queries using ordinary Scala types. As a result, queries can be processed and validated at compile time, even in user-provided database backends. Using Slick, programmers can directly write database queries in Scala, benefitting from the static checking, compile-time safety, and compositionality of Scala. Slick also allows for writing SQL queries and executing them with an API optimized for Scala instead of using JDBC.
Key features of the Slick database connector include support for nested tuples to overcome the limitation of 22 columns per query, enabling better structuring of query results; updated query syntax tree for better compositionality; and separate layers for the AST and the front-end for simpler code generation.
"Slick, the database connector, will enhance the capabilities of Scala in multiple dimensions including web, parallel scalability across multiple cores, and horizontal scalability across multiple machines," said Michael Azoff, principal analyst with Ovum. "Typesafe's roadmap indicates the maturing of Scala."
Slick features an extensible query compiler that can generate code for different backends. The following database systems are directly supported for type-safe queries (using the query language or Scala code lifted to database queries):
- Microsoft Access
- Microsoft SQL Server
"With more modern, efficient database query and access capabilities, Slick delivers a powerful framework for Scala programmers," said Mark Brewer, CEO of Typesafe. "With the introduction of our new database connector, we are making it even easier for developers to build next-generation distributed applications using Scala."