liveBook · Manning

Join table

As explained in .NET in Action, Second Edition

A join table is an intermediary database table that stores associations between entities in a many-to-many relationship.

In a many-to-many relationship, EF Core creates a third table to associate the entities. For Books and Tags, that join table has a compound primary key made from both IDs, with foreign keys applied to the join table. The entity classes need no foreign-key ID properties for this relationship. section 5.2.3

Figure 5.4 Many-to-many relationship

View the many-to-many relationship between Book and Tag. section 5.2.3

How .NET in Action, Second Edition covers it

How deep it goes
Explains automatic table creation, the compound primary key, and foreign keys.
Examples
Uses Books and Tags as the entities in a many-to-many relationship.
What you can do after
Understand how EF Core represents a many-to-many association in the database.
How it connects
Connects many-to-many relationships with foreign keys and compound primary keys.

Also explained in

Compare how 5 books explain join table →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET in Action, Second Edition. The section links point to the parts of the book it draws on.