Primary key in PATIENT and TEST tables are PCODE and TESTID respectively. Because primary key of a relational table uniquely identifies each record.Foreign key in PATIENT table is TESTID whose value is derived from the primary key (TESTID) of another table (TEST).