At the end of this session, students should be able to:
- Understand the purpose of JDBC
- Use JDBC to connect to a database
- Prevent SQL injection attacks
- Explain how connection pooling improves performance
- Use the data access object design pattern
Study for Week 5
This week we will be looking at how to connect to databases using JDBC.
This is our first week of persistence layer technologies. We will start with a quick look at how to use JDBC to connect to a database, then investigate some of the performance, security and maintainability issues.
At the end of this session, students should be able to:
Why should we use databases when developing applications, and what is the JavaDB database?
JDBC is the fundamental technology for accessing a database using Java:
A more detailed look at features of JDBC:
Types of JDBC drivers and how to use connection pooling to improve performance:
If you would like to study further, you may like to refer to this tutorial:
http://www.tutorialspoint.com/jdbc/index.htm
You can also refer to Chapters 3 and 4 of Database Programming with JDBC & Java:
http://find.lib.uts.edu.au/?R=OPAC_b2916561
Basic working knowledge of SQL will be assumed. If you would like to practice your SQL, this site has interactive tutorials:
http://sqlzoo.net/wiki/Main_Page