- Scala for Data Science
- Pascal Bugnion
- 97字
- 2021-07-23 14:33:09
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"
推薦閱讀
- Unreal Engine Physics Essentials
- Beginning C++ Game Programming
- PHP程序設(shè)計(jì)(慕課版)
- 編程珠璣(續(xù))
- ASP.NET 3.5程序設(shè)計(jì)與項(xiàng)目實(shí)踐
- PhoneGap Mobile Application Development Cookbook
- SQL經(jīng)典實(shí)例(第2版)
- Multithreading in C# 5.0 Cookbook
- ElasticSearch Cookbook(Second Edition)
- Building Wireless Sensor Networks Using Arduino
- 基于SpringBoot實(shí)現(xiàn):Java分布式中間件開(kāi)發(fā)入門(mén)與實(shí)戰(zhàn)
- Mastering Akka
- Buildbox 2.x Game Development
- 玩轉(zhuǎn).NET Micro Framework移植:基于STM32F10x處理器
- Python+Office:輕松實(shí)現(xiàn)Python辦公自動(dòng)化