That's an easy way to implement many-to-many relationships.
Consider this two tables:
category
--------
categoryID [PK]
categoryName
product
-------
productID [PK]
productName
If you add a categoryID
field to product
, every product can have only one category. But if we have a product_category_mapping
like this:
product_category_mapping
------------------------
mappingID [PK]
productID [FK]
categoryID [FK]
then we can have:
mappingID productID categoryID
--------------------------------
1 1 1
2 1 2
3 2 3
4 2 1
So product 1 is of category 1 & 2 and product 2 is of category 3 & 1, so many products belong to many categories, and many categories have many products.
As tdammers writes, this table is often referred to as a link table or bridge table, and I've even seen it referred as a HABTM table, from HasAndBelongsToMany which is apparently Ruby on Rails speak for many to many. And Wikipedia calls it a junction table and has quite a few more names for it.