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

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"
主站蜘蛛池模板: 大港区| 安西县| 辽宁省| 买车| 晋江市| 麟游县| 河东区| 乌拉特前旗| 南溪县| 松桃| 林甸县| 宝清县| 望江县| 老河口市| 徐闻县| 大方县| 织金县| 叙永县| 巫山县| 株洲市| 通河县| 河北省| 图们市| 怀远县| 卢龙县| 江安县| 无锡市| 榆中县| 子洲县| 邻水| 盱眙县| 澄江县| 东乡县| 三江| 贵阳市| 晋中市| 连州市| 佛山市| 喀什市| 湖口县| 丰原市|