A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Many to Many Data Integrity (Alway confuse myself)



 
 
Thread Tools Display Modes
  #1  
Old December 10th, 2009, 04:51 PM posted to microsoft.public.access.tablesdbdesign
DeDBlanK
external usenet poster
 
Posts: 4
Default 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  
Old December 10th, 2009, 06:41 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.