开发者

What do you call tables that create many to many relationships?

We a开发者_开发问答re having a debate here at the shed about what we call the table that contains the two foreign keys of entities that you use to create a many to many relationship. Here are the names we have, which do you use?

  1. Linking Table
  2. Cross Table
  3. Relation Table


4. Cross Reference.  

Describes what it actually does, is therefore intelligible to non-technical stakeholders, as in "We'll create a cross-reference for vendors and parts, listing which vendors supply which parts."

Note that "Relation table" if you use it would actually be "relationship table". The term "relation" is a term of art in relational database theory.


None of the above. What exactly is the definition of the type of table you are trying to describe? My only understanding is this: you mean a table with more than one foreign key. I don't know of any better definition than that. But why would you want a special name for a table with more than one foreign key? Tables with more than one foreign key aren't very unusual or special. I would just call them tables and leave it at that.


Wikipedia, calls it is an "associative table", "(also known as join table, junction table, or cross-reference table)".

It seems that calling it a "many-to-many table" might be clear to developers, while I appreciate @Ken Downs's example sentence to describe it "intelligibly to non-technical stakeholders" ("cross-reference for vendors and parts").


Of the three: Cross-table. Just because I've heard that more often.

I'd prefer "Relation Table" before "Linking Table" - it links the items via their relationship.

Probably the best name would be "Join Table" -- since you're using it to join two other tables together, with extra details (optional).

I've also heard "Edge Table" -- any idea where that comes from?


There's only one correct answer... cross table


  1. Junction Table.
  2. Relationship Table (as opposed to Entity Table)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜