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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access