Quantcast
Channel: Duplicate primary keys in many-to-many relationship - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by nvogel for Duplicate primary keys in many-to-many relationship

Consider what information you are trying to represent in the tCustomer_tArticle table. In the following case for example:kCustomer | kArticle | number----------+----------+---------2 | 2 | 32 | 2 |...

View Article



Answer by Gordon Linoff for Duplicate primary keys in many-to-many relationship

I don't know where it is "highly recommended" that the two foreign keys be the primary key. That is definitely one approach under the right circumstances. I prefer the approach of always assigning a...

View Article

Answer by LomoY for Duplicate primary keys in many-to-many relationship

"Now my question is do I need to add an AUTO_INCREMENT primary key to the third table or should I use the physical order to have unique records."What do you mean by "the physical order to have unique...

View Article

Duplicate primary keys in many-to-many relationship

There is a m:n relationship between the two tables tArticle and tCustomer. Whenever a customer buys an item, a link between the article and the customer is stored in the third table with an additional...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images