Lesson 21Working with Relational DBMS Using JDBC

Business applications usually store data in the databases. In most of the enterprise applications, Relational Database Management Systems (RDBMSes) are used as data storage. They store the data records in tables. Each record (such as that of an employee) is represented by a table row, which consists of one or more columns or record fields (for example, name, address, hire date). RDBMSes understand the SQL language.

The most popular RDBMSes are Oracle, DB2, Sybase, Microsoft SQL Server, and MySQL Server. This lesson uses Apache Derby DB (also known as Java DB), which is included with Java SE for Windows, or you can separately install it on a Mac or Linux machine.

Java includes two packages that contain classes required for work with DBMSes: java.sql and javax.sql. The former contains commonly used classes such as Connection, Statement, and ResultSet. The latter is used for supporting database connectivity on the server side, containing classes such as DataSource and RowSet.

The JDBC API is not DBMS-specific—if you write a program that uses JDBC classes to retrieve/update data in ...

Get Java Programming 24-Hour Trainer, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.