I have been given an ERD of a database that I need to create in PostgreSQL. Shown below.
As you can see on the table Enroll, there are two primary keys that are also foreign keys as well that need to be in that table, how would I go about creating this table this is what I have so far,
create table enroll(
class_code varchar(15) primary key references class(class_code),
trn_num int primary key references TRAINEE(trn_num),
enroll_date date,
enroll_grade int
);
Many thanks in advance for any help!