Chapter 8. A Relational SQL Example

Before starting down the path on how to use JDBC with Data Definition Language (DDL) to create database objects such as tables, sequences, and indexes, and on how to use Data Manipulation Language (DML) to insert, update, delete, or select information from tables, let’s take a chapter to develop a hypothetical relational SQL example to use in the chapters that follow. In order to have a context in which to work, we’ll formulate a relational solution to part of a common business problem, Human Resource (HR) management.

An HR management system is more than just a means of generating payroll and tax withholding. Large organizations must also comply with safety and environmental regulations. Consequently, their HR systems must keep track of the physical locations in which people perform their work, along with the actual type of work they are performing. For management reasons, HR systems also need to keep track of whom a person reports to and in which department of the organization a person performs work. HR systems also need to track the legal status of their workers to know whether they are employees or contractors. All this information changes. An HR system not only needs to maintain this information for the current point in time, but also for any past point in time.

Since there are many books written on the subject of database analysis and design, I’d like to emphasize here that I will not follow any particular methodology, nor will my analysis ...

Get Java Programming with Oracle JDBC now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.