ScalaQuery is a typesafe API / DSL (domain specific language) built on top of JDBC for accessing relational databases in Scala.
The low-level JDBC API is powerful but comes with a lot of verbosity. ScalaQuery was designed from the ground up to reduce the amount of boilerplate required and make use of Scala's features to provide a more natural fit for database access in a Scala environment.
The basic idea is that tables in the database get represented as object
s extending a Table
trait. This object can then be used in for comprehension extremely similar to normal Scala collection.
ScalaQuery is not an ORM, i.e. it doesn't do caching, tracking of objects for change or similar things. It is more a way to replace or generate SQL.
NOTE: Since early 2012, ScalaQuery has evolved into Slick.