Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
479 views
in Technique[技术] by (71.8m points)

naming conventions - Is there an official name for the many-to-many relationship table in a database schema?

Most of the projects I've worked on have required many-to-many relationships in the database schema. For example, you might have the concept of Users and Groups, and the database might contain a table User, a table Group, and a table UserGroup to relate the two.

I'm interested in the conceptual name of the UserGroup table in that example.

I've grown accustomed to calling them "swing tables" because that's how I learned it, but I haven't heard other people use that term in a while.

Instead, I've heard all of the following (including some new ones, thanks to all of you!):

  • Association table
  • Bridge table
  • Cross-reference table
  • Gerund (E.F. Codd, creator of the relational model, may prefer this)
  • Intersection tables
  • Join table (most search results on Google...see answer below)
  • Junction table (Wikipedia favors this one)
  • Link table (Fowler likes this one)
  • Many-to-many relationship tables
  • Map table
  • Reference table
  • Relationship table
  • Swing table

Is there an official name for this kind of table, with a source to back its official-ness?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I call it a cross-reference table.

Some may not consider this an official term, but it's certainly a popular one. I mean, you'll find plenty of relevant results in Google if you search for it. The other thing I like is that it can be easily abbreviated "xref" and then used in your table naming scheme, e.g. "table1_xref_table2". That'll get everyone on your team calling it the same thing.

UPDATE:

Wikipedia calls it a junction table. It's strange that I've never heard that term but I suppose different circles call it different things. As we're finding out -- there is no single official answer.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...