Object Relational Mapping with Toplink
Mapping objects to tables
Direct to Field mapping is most common. One database attribute maps to one Java domain class field.
One-to-many mappings - typically a list that hangs off a parent class. A Manager employee has one to many "managedEmployees".
One-to-one mapping: an Employee has one (and only one) Address
Many-to-many mapping: an Employee has multiple project (and vice versa). An intermediate (or linker) table is frequently the clue to this one.
Aggregate object mappings: One-to-one mappings that require both objects to exist in the same database row