Java JDBC Programming - 21 Hour Online Class or 3 Day Classroom Workshop
An introduction to JDBC, the standard coding method for Java programs requiring database access, for students familiar with Java and SQL. Covers an overview of JDBC including what it is, where it lives and the basic approach, JDBC versus ODBC, Java.sql, handling SQL in JDBC, and setup; connecting to a database including JDBC Drivers, the DriverManager Class and loading Drivers; JDBC and ODBC URLs, parameters, strings and properties; creating, executing and closing SQL Static Statements; JDBC data types; the basics of Results Sets in JDBC including getting, reading, closing and updating; JDBC exceptions; SQL Prepared Statements; Metadata including what it is, getting and using it and various types; Escape Clauses; SQL Stored Procedures; data management in JDBC; SQL Batches, and Enterprise JDBC.
|
|
Topic Summary | Print Version
Class Description:
JDBC has long been the standard way of coding Java programs that need database access. Programs coded using the JDBC API benefit from all the portability and platform independence that has been the hallmark of Java applications. In addition, since JDBC is an open API, it will allow one to write DBMS independent applications without having to learn vendor specific features.With the advent of the Java 2 Platform and Enterprise Java, JDBC is used in middle-tier Java code (servlets and Enterprise JavaBeans) as well as front-end applications.This 3-day course will provide a first introduction to JDBC. It includes both instructional and hands-on lab work designed to reinforce the lectured material. Course workshops have been designed for either Oracle, Access or Cloudscape.Audience: Students interested in developing Java applications or components that must directly access a database. This includes Enterprise JavaBeans that will manage their own persistence.Prerequisites: Students are expected to be comfortable with the basics of the Java language and to have a fundamental understanding of SQL. |
Objectives: This course will teach you to:
Look Inside This Book:
|
Topic Summary
- An Overview of JDBC
- What is JDBC?
- Call-Level Interface
- Higher-Level Access
- JDBC vs. ODBC
- Where Does JDBC Live?
- java.sql
- JDBC Versions
- JDBC: The Basic Approach
- Handling SQL in JDBC
- Setup Workshop
- Connecting to a Database
- The DriverManager Class
- Using JDBC Drivers
- Using a System Property
- Loading Drivers Explicitly
- Database Connections
- Connecting to a Database
- JDBC URL
- ODBC URLs
- Connection Parameters
- Parameters in URL
- Separate Strings
- Properties Object
- Using the Right Driver
- Connection Failure
- Read-Only Connections
- Closing the Connection
- Connecting Workshop
- Executing SQL I: Static Statements
- Static Statements
- Using Statement Objects
- Creating a Statement
- Executing a Statement
- Executing Queries
- Executing Updates
- Simultaneously Queries
- Closing a Statement
- Putting It All Together
- Static Statement Workshop
- JDBC Data Types
- Mapping Types
- Special SQL Types
- Numeric Types
- Date/Time Types
- SQL 99 Types
- Reading/Writing SQL Data
- Result Sets I: Basics
- Result Sets
- Result Sets in JDBC
- Getting a ResultSet
- Moving the Cursor
- Reading Data
- Getting the Values
- Putting It All Together
- Detecting NULLs
- Closing a ResultSet
- Results Sets Workshop
- Result Sets II: More Features
- ResultSet Attributes
- ResultSet Type
- Concurrency
- Fetching
- Updating ResultSets
- Updating a Row
- Inserting a Row
- Deleting a Row
- Detecting Changes
- Updating Result Sets Workshop
- JDBC Exceptions
- Catching Errors
- SQLException
- SQL Warnings
- Data Truncation
- Executing SQL II: Prepared Statements
- Prepared Statements
- Preparing a Statement
- Input Parameters
- Executing the Statement
- Putting It All Together
- Prepared Statements Workshop
- Getting Metadata
- What is Metadata?
- Result Set MetaData
- Result Set Metadata
- Column Type & Identity
- Column Attributes
- Database Metadata
- Catalog Metadata
- Schema Metadata
- Table Metadata
- Getting Table Information
- Other Table Metadata
- Column Metadata
- General Database Information
- JDBC Driver Information
- Metadata Workshop
- Escape Clauses
- Escape Clause Overview
- JDBC Escape Clauses
- Date/Time Literals
- Scalar Functions
- Escape Processing Control
- Escape Clauses Workshop
- Executing SQL III: Stored Procedures
- Stored Procedures & JDBC
- Using CallableStatements
- Creating a CallableStatement
- Registering Out Params
- Calling the Procedure
- Getting Out Values
- Putting It All Together
- Procedure Metadata
- Stored Procedure Workshop
- Data Management in JDBC
- The Issues
- Data Consistency
- Using Transactions
- Transactions in JDBC
- Autocommit Mode
- Explicit Mode
- Transactions Support
- Concurrency
- Concurrency Problems
- Managing Concurrency
- Isolation Levels
- Isolation in JDBC
- Transaction Management Workshop
- Executing SQL IV: More Statement Features
- Dynamic SQL Execution
- Getting Multiple Results
- Batch Processing
- Executing a Batch
- Batch Prepared Statements
- Batch Exceptions
- Batch Processing Workshop
- More on Drivers
- Types of Drivers
- Accessing Drivers
- Getting Driver Information
- Login Timeout
- JDBC Trace Log
- Managing Drivers Workshop
- Enterprise JDBC
- JDBC & Enterprise Java
- Data Sources
- Row Sets
- Connection Pools
- JDBC Events


