Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

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

like image 454
Imran Avatar asked Jun 15 '10 12:06

Imran


People also ask

What is the many-to-many relationship table called?

Junction table. When you need to establish a many-to-many relationship between two or more tables, the simplest way is to use a Junction Table. A Junction table in a database, also referred to as a Bridge table or Associative Table, bridges the tables together by referencing the primary keys of each data table.

How do you name an association table?

I recommend using a combination of the names of entities and put them in the plural. Thus the name of the table will express connection "many-to-many". If you are going the "names of tables" route, this is better since the singular version would "usually" be a namespaced table.

What is an association table?

Association tables are used for many-to-many relationships between two objects. They consist of at least two foreign keys, each of which references one of the two objects. Here is an example of an apple that can be eaten by more than one person, where each of these people can also eat multiple apples: Association Table.

What does a junction table do?

A junction table contains the primary key columns of the two tables you want to relate. You then create a relationship from the primary key columns of each of those two tables to the matching columns in the junction table. In the pubs database, the titleauthor table is a junction table.


2 Answers

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
  • Pivot 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 totally changed the answer.

like image 149
4 revs, 2 users 65% Avatar answered Sep 25 '22 19:09

4 revs, 2 users 65%


Cross reference table. CustomerProductXRef.

like image 34
Raj Kaimal Avatar answered Sep 25 '22 19:09

Raj Kaimal