Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Whether you're building a web- or desktop-based application with Java SE or Java EE, many Java applications need to integrate data from a relational database. This course describes how to read and manage data from relational databases such as MySQL and SQL Server using the Java Database Connectivity (JDBC) API.
Author David Gassner explains how to choose a JDBC driver and connect to one or more databases. He also provides detailed instructions on reading, selecting, and updating data; calling stored procedures; managing data via JavaBean classes or with prepared statements; and working with metadata.
If you're a Premium Member of the lynda.com online training library, or you're watching this video series on a disc, you'll have access to the exercise files that accompany this course. I have copied the exercise files to my Desktop, but you can place them anywhere on your hard disk. The main exercise files for the course are divided into chapters, and within each chapter there are folders that are designed as projects that can be imported into Eclipse. They were created with Eclipse 4.2 or Juno but should be importable in older versions as well.
You will need Java 7 installed to use any of these projects. To import any Project go in to Eclipse. From the menu, select File > Import, then from the Import dialog under General, select Existing Projects into Workspace > Browse and choose the Root folder for the project you want to Import. I'll start with my Desktop where I have installed the exercise files, then I'll go to Exercise Files/03_Connections for chapter 3, and I'll choose the project JDBCExceptions.
I'll then follow the rest of the buttons to import the project into Eclipse. You should then be able to open the project in the Package Explorer view open the Source folder and its packages and open any of the classes. I have opened the Main class from this particular application with either the main class or the project selected, you should then be able to run the application by clicking the run button and the result will show up in the console view. If you have the editor maximized like this then the Console view will appear on the right. To get rid of it, click into the Console view and back on the editor.
You can also debug by clicking an icon on the toolbar. And if there are any errors or breakpoints, you'll go into the debug perspective, and you might be prompted with a dialog before that happens. You can also run or debug using keyboard shortcuts. To find out about these keyboard shortcuts go to the Run menu. The keyboard shortcuts differ between operating systems, look here to find out the keyboard shortcut for your operating system. I have also provided some free exercise files that are available to everybody, regardless of membership status.
These exercise files contain code, database scripts, and libraries. The code folder includes a single project that I'll describe later in the course. The database folder includes scripts for both MySQL and HSQLDB and one text file that contains to MySQL stored procedures that I'll use later in the course. The libs folder contains to open source Java libraries. These are drivers, one for HSQLDB, and one for MySQL.
You can also download the latest version of these JAR files from the vendor sites. But to simplify things, I have included them in these Free exercise files. So that's a look at the exercise files that accompany the course. The Free exercise files are available to all, and the Main exercise files are available to Premium Members or those who have purchased the DVD. If you don't have access to these Main exercise files you can follow along with your own Java code.
There are currently no FAQs about Java Database Integration with JDBC.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.