When a class has a property of type
java.util.Collection, or any of its subclasses, there is certainly a one-to-many or many-to-many relationship between the class and the collection's elements. The collection may contain objects of either value type or entity type. Regardless of the object type the collection maintains, we always need an extra table to store the collection elements. Obviously, this table must include a primary key column if the collection maintains entity types.
Java provides different collection types, all represented as subinterfaces or implementations of
java.util.Collection. Additionally, Java provides maps, represented by implementations and subinterfaces of the
java.util.Map interface. The
Map interface ...