I know that PK have to have unique values. I also know that for a table to be in 3NF, there can be no non-key depending on another non-key.
I'm trying to create a table with these requirements: The data reflect that a professor can have multiple advisees, can serve on multiple committees, and can edit more than one journal.
I have a Professor table with these attributes (all dependent on PK):
Professor A has 5 COMMITTEE_CODE, so I put different COMMITTEE_CODE on different rows (to make each box atomic), but that means I'll have to repeat the EMP_NUM, PROF_RANK and PROF_OFFICE 5 times. So now idk if EMP_NUM can be considered the PK anymore.
I saw examples on some websites that have repeating values for the PK in a 3NF table. But idk, isn't PK supposed to have only unique values?
If I separate the EMP_NUM and COMMITTEE_CODE to a new table, I'll still have to repeat the same EMP_NUM 5 times for 5 different COMMITTEE_CODE.
As I understand Professor-Commitee is a many-to-many relation. In this case you should create a join table PROF_COMM_REL
table where it would have
SURROGATE ID
EMP_NUM (FK)
COMMITTEE_CODE(FK)
The Professor table should not have any COMMITTEE_CODE
as the relation is stored in the join table.
I would also recommend using surrogate keys - ids that do not have any meaning like anything that can change over time. For example, the name must not be PK as the name of a person can change and it would implicate to update whole db structure