Simple question, can't seem to find an answer on Google. I'm normalizing a database and I'm converting one of the tables to 2nd Normal Form. Question is: can the primary key of a table also be a foreign key in that same table?
If it makes it easier to understand, I'm trying to eliminate the partial dependencies in the table (but that was probably obvious since I mentioned 2nd Normal Form).
I have the table JobItem, which looks like this:
Job No (PK),
Item Code (PK),
PO Num,
Item Description,
Item Type,
Vendor,
Job Name
Job Name
is partially dependent on the Job No
component of the key.
Item Description, Item Type and Vendor
are dependent on the Item Code
component.
PO Num
is dependent on the entire key.
What I'm asking is once I strip out the partial dependencies into their own tables, will the components of my key also become foriegn keys to reference the new tables?
EDIT: Fleshed out the example to be a bit more relevant.