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

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"
主站蜘蛛池模板: 肥乡县| 呈贡县| 镇平县| 余江县| 额济纳旗| 吉林省| 营山县| 鄂伦春自治旗| 丰城市| 体育| 当阳市| 忻州市| 安仁县| 开原市| 韶山市| 泗洪县| 安顺市| 土默特右旗| 叙永县| 华亭县| 彭泽县| 贡嘎县| 百色市| 彩票| 漳平市| 江达县| 澄城县| 黔西| 双辽市| 郑州市| 绿春县| 甘肃省| 秀山| 斗六市| 香河县| 灌南县| 资溪县| 金昌市| 屯昌县| 富裕县| 镇原县|