Alan Smith wrote:what is the point of this table and how do I use it?
This would be an "intersection table" and is used simply to provide a mapping between the primary keys of the two tables at either end of the M:N relationship. Normally, a parent-child key relationship is 1:N, and you would include the primary key of the parent (the "1" end) in the child table (the "N" end), where it is called a "foreign key" back to the parent table. So you can find the children for a given parent, or join back to the parent from the children if needed. But when you have a M:N (many-to-many) relationship, this won't work, because there is no "1 end" of the relationship. So you add the intersection table, which allows you to turn the "M:N" relationship into two separate relationships - 1:M from one parent, and N:1 to the other parent - where your intersection table holds foreign keys back to each of the parents. The records in the intersection table actually represent this M:N relationship in a normalised form, and the primary key of the intersection table is the combination of the two foreign keys.
For example, a book can have several authors, and an author can write many books, so Author:Book is a M:N relationship. Assume your BOOKS table has a unique book_id as its primary key, plus a title and various other attributes. The AUTHORS table has a unique author_id as its PK, plus a name and other attributes. The intersection table might be called BOOK_AUTHORS and would simply contain the two PKs with one row for each of the required book/author combinations. So the book "100 Great Widgets" by Quentin Zyzygy and Amanda Aardvark would be represented like this:
This table structure allows each book to have several authors, and each author to have many books, which is exactly what we need.
As Wendy says, once you have set this up, you can use it in the same way as any other table by joining to/from the table in SQL etc. ORMs and other non-relational technology may have different conventions for managing M:N relationships, but it's still the same principle in your relational database underneath.