Database connections


Java can be used to communicate with databases, through a set of built-in classes called the JDBC. The JDBC has methods in it that allow you to talk to databases using pure Java, though it also allows the issuing of SQL commands, which is more common. In addition, for practicing, Java also comes with a small database of its own called Derby. This is a light-weight database that you can bundle with programs.

For this project, you could:

Day one: learn a bit about the JDBC and run through a practical that connects to a Derby database.

Day two: build an application that talks to a fuller database and reads some files into it or manipulates some data.


Day One

Check out the lecture and practical on databases in the extra materials. Have a play with issuing some more advanced SQL against Derby.

Day Two

Use file I/O to get some data into a full database.