O'Reilly logo
  • Ketan Khairnar thinks this is interesting:

The classes Warehouse and Address have a one-to-one relationship: a warehouse has exactly one address, and an address belongs to exactly one warehouse. When looking at the database, a one-to-one relationship is indistinguishable from a one-to-many relationship; it’s mapped by a foreign key column on one table, pointing to the primary key column on another table, as illustrated in figure 7.14.

Figure 7.14. A one-to-many database relationship


Cover of Play for Java


OneToOne How to