r2_d2
r2_d2

Reputation: 203

Best way to design a table with m:n relation

What is the best way to design a table for a m:n relation between two entities??

Upvotes: 0

Views: 185

Answers (1)

Stephen S.
Stephen S.

Reputation: 1656

Three tables. One defining the first entity, one defining the second, and a third representing the relationship between them.

  • Table 1 (first entity): T1Id, T1Name
  • Table 2 (second entity): T2Id, T2Name
  • Table 3 (relationship): T1Id, T2Id

Upvotes: 3

Related Questions