Database Access Lectures

This module introduces two different ways to access a database, sending SQL statements and using an O/R mapping framework.

1. SQL Tutorials

This is not  a database course, and there is no video on databases or SQL recorded for the course. Instead, there is some online material below for those who need to study SQL.

2. SQL statements and Java Database Connectivity, JDBC

This part explains how to use JDBC to send SQL statements to a database.

Source Code

The programming examples can be found in GitHub, https://github.com/KTH-ID1212/db.

Videos

3. O/R mapping and Java Persistence API, JPA

This part explains how to use JPA to interact with an O/R mapper.

Source Code

The programming examples can be found in GitHub, https://github.com/KTH-ID1212/db.

Videos

Introduction to JPA, and a client-server bank program, which uses JPA to persist data in a database Links to an external site.The example above illustrates the following.

  • Object-relational (O/R) mapping
  • JPA usage
  • Solving race conditions with a transaction API instead of the synchronized keyword.