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

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"
主站蜘蛛池模板: 邯郸市| 建平县| 元朗区| 台山市| 海兴县| 松江区| 龙泉市| 福州市| 桦川县| 南涧| 府谷县| 合山市| 金乡县| 泸西县| 海南省| 青州市| 宁晋县| 九寨沟县| 习水县| 磴口县| 永登县| 青河县| 新干县| 宜黄县| 西充县| 句容市| 无棣县| 获嘉县| 深圳市| 安福县| 黄骅市| 齐齐哈尔市| 西安市| 石阡县| 海安县| 温泉县| 承德县| 姚安县| 沂源县| 沾化县| 来宾市|