官术网_书友最值得收藏!

Interacting with JDBC

JDBC is an API for connecting to SQL databases in Java. It remains the simplest way of connecting to SQL databases from Scala. Furthermore, the majority of higher-level abstractions for interacting with databases still use JDBC as a backend.

JDBC is not a library in itself. Rather, it exposes a set of interfaces to interact with databases. Relational database vendors then provide specific implementations of these interfaces.

Let's start by creating a build.sbt file. We will declare a dependency on the MySQL JDBC connector:

scalaVersion := "2.11.7"

libraryDependencies += "mysql" % "mysql-connector-java" % "5.1.36"
主站蜘蛛池模板: 宁安市| 弥勒县| 琼海市| 寿宁县| 瓦房店市| 东山县| 乌拉特中旗| 舞钢市| 江源县| 莱州市| 二连浩特市| 平山县| 大竹县| 北票市| 六盘水市| 南涧| 申扎县| 石城县| 西畴县| 海林市| 陆河县| 诸暨市| 凭祥市| 托克托县| 封开县| 安国市| 郴州市| 布尔津县| 通州区| 兴国县| 驻马店市| 富宁县| 水富县| 德钦县| 耿马| 富民县| 应城市| 崇左市| 临安市| 凌海市| 交口县|