Lisa Austin wrote:I say this because I found a few examples such as the one below but when I asked my instructor his response seems to imply that it doesn't need to be a join. What he says and I quote
"If the field name is predictable it should know what to do" and "Use a list."
Having a
ManyToMany relationship without having a join table sounds very weird from a database design point of view, because that would mean you have lots and lots of duplicate values in different tables. The join table takes care of this duplication (and you can even add specific columns to each record in the join table.
For example:
employee:
id,
first_name,
last_name
project:
id,
name
employee_project:
employee_id,
project_id (and you could have additional columns like
start_date and
end_date as well)
Even the excellent
Java Persistence WikiBook uses a JoinTable with a ManyToMany relationship as the only possible solution.
Hope it helps!
Kind regards,
Roel