Here's the tables in question. There are actually 2 sets like this, but one example will suffice (I have eliminated some non-relevant attributes):
Code: Select all
Article
ArticleID (PK) BIGINT
Title VARCHAR (100)
Text CLOB
Author
AuthorCode (PK) CHAR (3)
Name VARCHAR (50)
Email VARCHAR (150)Code: Select all
ArticleAuthor
AuthorArticleID (PK) BIGINT
ArticleID (FK) BIGINT
AuthorCode (FK) CHAR (3)Code: Select all
ArticleAuthor
101 1 ABC
102 1 DEF
103 2 SSS
104 3 DEF
105 4 XYZFor those who have the O'Reilly chapter:
I see that in the O'Reilly example - the ReviewerGenre join table to be specific - they don't use a new PK. Instead, they call both the reviewerID and the code as PKs. It is my understanding that this mmust be an error. They make acceptable FKs, but PKs have to be unique, so neither would be acceptable to use as PKs.
Thanks in advance for any help.
peace
Go Leafs Go!!!!