From the course: Database Foundations: Data Structures

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

One-to-many relationships

One-to-many relationships

From the course: Database Foundations: Data Structures

Start my 1-month free trial

One-to-many relationships

- [Instructor] In a relational database, there are three different kinds of relationships that can be made between the rows in two different tables. The most common, by a large margin, is a one-to-many relationship. If you think about your own life, you'll easily find one-to-many relationships all around. Your one library card has been used to check out many books. Your one bank account has had many transactions. A single customer can make multiple purchases. One-to-many relationships are everywhere. A one-to-many relationship doesn't mean that there are absolutely multiple related records, though. It simply means that the database tables are configured to support the possibility. The relationship describes the tables, not the data. Consider the pet owners database again. In the beginning, our friend Tabitha has no pets. Her record is added to the owners table, but there are no matching records in the pets table. The…

Contents