So you have one table with a composite Primary Key, each element of which references the Primary Key of another table.
Without specifics, let's take a simplistic example of a Student taking a Class taught by a specific Teacher. Each Entity (Student, Class, Teacher) can exist on its own (i.e. has its own table) and the association of the three is a student actually taking a class (OK, I'm ignoring dates in all this!).
create tableA ( id ... primary key ( id ) ) ;
create tableB ( id ... primary key ( id ) ) ;
create tableC ( id ... primary key ( id ) ) ;
create tableD
( a_id ...
, b_id ...
, c_id ...
, foreign key ( a_id ) references tableA ( id )
, foreign key ( b_id ) references tableB ( id )
, foreign key ( c_id ) references tableC ( id )
);
(Aid, Bid, Cid)
(for example) stored inTableD
then you can create a composite primary key on it. Or you can create three foreign keys, one to each field referencing each correlating table, as mustaccio mentions too. In either case, you do need to duplicate the fields in your new tableTableD
.