Many-to-Many Relations

A many-to-many relation means that one or more records in a type is associated with one or more records in another type.

 type Customer struct {id int unique, relation addr Address many  } end
 type Address struct {id int unique, relation cust Customer many } end

Here a customer has oen or more addresses, and an address has one or more customers customer. If optional is used then that side of the relation becomes zero or more.

With many-to-many relations, Delia creates a separate association table (also known as a junction table).

Many-to-many relations are allowed to have both sides mandatory.