Since a junction table is used for tying two tables together, then it seems logical to only have respectively primary keys as foreign keys in the junction table.
Is it possible to create a table in Access with only two foreign keys, and NO primary key?
Member
20 Points
96 Posts
How do I construct a junction tables with foreign keys?
Mar 13, 2016 12:58 AM|Ptolemy|LINK
Since a junction table is used for tying two tables together, then it seems logical to only have respectively primary keys as foreign keys in the junction table.
Is it possible to create a table in Access with only two foreign keys, and NO primary key?
All-Star
191752 Points
20952 Posts
ASPInsiders
Moderator
MVP
Re: How do I construct a junction tables with foreign keys?
Mar 13, 2016 08:30 AM|XIII|LINK
Hi,
you can leave out the primary key column in the junction table and take the columns of both foreign keys as a surrogate primary key. Note that it has consequences though. This article explains it nicely with pros and cons: http://en.tekstenuitleg.net/articles/software/create-a-many-to-many-relationship-in-access.
Grz, Kris.
Working with Azure, chatbots, ASP.NET MVC, Web API, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!