If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Many to Many Data Integrity (Alway confuse myself)
OK, thanks in advance. I always screw this up so here it goes:
Three tables: Line, Part, LinetoPart I could set these tables up differently, but Part A can be ran on Line1, 2, or 3. LinetoParts has autonumber pkLinetoPart, fkLine, and fkPart. So how do I keep the many table from duplicating say an entry stating that Part A to Line 1? Am I missing the boat here? In the LinetoParts pkParts can duplicate and pkLine can duplicate, but I don't want a duplicate record with the same pkPart and pkLine. *Relationship Algebra why do you plague me so?* |
#2
|
|||
|
|||
Many to Many Data Integrity (Alway confuse myself)
At the nuts and bolts level, what you seek is a constraint on records in your junction table, not on the relationships. How about creating a 2 field (fkLine, fkPart) index in your junciton table set to "unique"? |
Thread Tools | |
Display Modes | |
|
|