I have a Table "Position" wich allready exists
- PositionID (PK) int
- PositionText
- ...
Now I have to create a new Table "PositionComment" (I'm not allowed to edit the Table Position, so I have to create a new one). The relation is 1:0..1 (it is garantied through code, that 1 position can only have 1 comment).
So i need to have a primary key in this new table - but:
For the rules of normalisation:
Do I have to make the foreign key = primary key, because it is 1:0..1 e.g.:
- PositionID (PK, FK to Position-Table)
- CommentText
OR
Do I have to make a own primary key e.g.:
- CommentID (PK)
- PositionID (FK to Position-Table)
- CommentText
The difference is, ofc, that in the first suggestion I use a different PK as PK in the second table... But in the second suggestion I have a double Identifier because the CommentID and the PositionID will be unique for 1 row...
How to do this for the rule of normalization and why?