This illustration shows a one-to-many relationship with Java classes and a relational database.
In a Java class, the phones
attribute of the Employee
class contains a 1:M (one-to-many) to three target classes. Each target class contains a 1:1 (one-to-one) mapping back to phone
.
In a relational database, each row of the target table contains a foreign key reference to the source table.