What's the correct name for an “association table” (a many-to-many relationship) [closed]

℡╲_俬逩灬. 提交于 2020-01-19 22:23:20

问题


What's the correct or most popular name for an "association table"?

I've heard lookup, associative, resolving, mapping and junction table.


回答1:


Cross reference table. CustomerProductXRef.




回答2:


There is no "correct" name, but the academic name would be an "Associative Table" (see See the Wikipedia article Associative Entity). Other common names are (in alphabetical order):

  • Association table
  • Bridge table
  • Cross-reference table
  • Crosswalk
  • Intermediary table
  • Intersection table
  • Join table
  • Junction table
  • Link table
  • Linking table
  • Many-to-many resolver
  • Map table
  • Mapping table
  • Pairing table
  • Relationship table
  • Transition table

Note: This is contents original created by Derek Greer but that was posted as an edit to an accepted answer that totaly changed the answer.




回答3:


"Correct" depends on the modeling methodology in use. I am familiar with Chen, in which this table is the physical implementation of an Associative Entity. I suppose most popular would be directly related to most popular modeling methodology.

Wikipedia lists several names for this type of table.




回答4:


I was taught and use the term "Join Table"




回答5:


Depends on whom you ask. They're all correct, use the term that makes the most sense to who you're talking to.




回答6:


Do you call your customer table CustomerTable or Customer or Customers? I generally use a "business object" name (eg Orders for information about which customers have ordered which products, not CustomerProduct) but a table that really just tracks the relationship, like SalesRepCustomer, I give the name of the two tables involved and don't add a suffix. As others say, be consistent.

I reserve the name lookup (in conversation, not in the table name) for things like "what is the name of Country 11", not for "which sales rep looks after Country 11".




回答7:


Relationship table.

"One of the basic tricks in SQL is representing a many-to-many relationship. You create a third table that references the two (or more) tables involved by their primary keys. This third table has quite a few popular names, such as 'junction table' or 'join table,' but I know that it is a relationship."

Hollywood Couples by Joe Celko




回答8:


We call these Crosswalk tables where I work. Naming is based on Table1XTable2 where the contents are the PKs of the 2 tables.



来源:https://stackoverflow.com/questions/3045034/whats-the-correct-name-for-an-association-table-a-many-to-many-relationship

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!