Relationships

Although tables are certainly the primary component of a relational database, it's the relationships between the tables that make the database so powerful. After all, if you couldn't establish relationships between tables, the database would be nothing but a simplified spreadsheet program. As it is, however, you can create relationships between tables by relating groups of keys together. There are three types of database relationships: one-to-one, one-to-many, and many-to-many.

The term relationship can refer to a relationship that the database knows about, or it can refer to a conceptual relationship that you might know about but the database does not. When you tell the database about a relationship, it automatically enforces ...

Get Special Edition Using Java™ 2 Enterprise 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.