Say i have an ER model
_____________
| E2 |
|_____________|
| | |
| | |
A21* A22 A23*
where the A21 and A23 are primary keys.
Would this mean the primary key for E2 will be
PRIMARY KEY(A21, A23)?
If so, then what is the difference of the diagram below.
_____________
| E2 |
|_____________|
| | |
| | |
[]---|----[]---[]
| | |
| | |
A21* A22 A23*
where the [] are representation of a combination of primary keys. is this the same as the previous diagram and the primary key being PRIMARY KEY (A21, A23)?
Then, based on the first diagram, should there be SQL code, can the statement REFERENCES E2(A21) and REFERENCES E2(A23) exist? Or do we have to always reference all the primary keys in a table?
I hope my question is clear enough.