Chapter 2. Relational Databases and SQL

Good sense is the most evenly shared thing in the world, for each of us thinks he is so well endowed with it that even those who are the hardest to please in all other respects are not in the habit of wanting more than they have. It is unlikely that everyone is mistaken in this. It indicates rather that the capacity to judge correctly and to distinguish true from false, which is properly what one calls common sense or reason, is naturally equal in all men, and consequently the diversity in our opinions does not spring from some of us being more able to reason than others, but only from our conducting our thoughts along different lines and not examining the same things.

René Descartes, Discourse on the Method

Before you dive into the details of database programming in Java, I would like to take a chapter to provide a basic discussion of relational databases for those of you who might have little or no experience in this area. The subject of relational databases, however, is a huge topic that cannot possibly be covered fully in this chapter. It is only designed to provide you with the most basic introduction. Experienced database developers will find nothing new in this chapter; you will probably want to skip ahead to Chapter 3.

What Is a Relational Database?

Programming is all about data processing; data is central to everything you do with a computer. Databases—like filesystems—are nothing more than specialized tools for data storage. Filesystems ...

Get Database Programming with JDBC & Java, Second 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.