[AccessD] Confused by One to Many versus One to One

Rocky Smolin rockysmolin at bchacc.com
Fri Nov 28 18:57:12 CST 2014


IIUC:

Order table to OrderProduct table should be 1 to many (Order table PK,
OrderProduct table FK) as you can have many products in one order.

Product table to OrderProduct table should be one to many (Product table PK,
Order Product FK) should be one to many as one product can appear in many
OrderProduct records.

HTH

Rocky Smolin
Beach Access Software
858-259-4334
www.bchacc.com
www.e-z-mrp.com
Skype: rocky.smolin
 


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson
Sent: Friday, November 28, 2014 4:52 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Confused by One to Many versus One to One

I almost never make relationships one to one, and yet my databases always
seem to "work." By work, I mean that I never seem to run into situations
where I cannot accomplish what I want to, in terms of record insertion,
queries, etc. So I now have a situation where maybe that is not a good idea.

 

I have Order and Product tables, one order can contain many products. So I
required an OrderProducts table to distribute the same OrderID across
numerous ProductIDs.

 

My question is, should the relationship between the Order and OrderProduct,
on the OrderID and FKOrderID, be 1-to-1, or 1-to-many?

 

Likewise, the same question for the OrderProduct and the Product, on the
ProductID and the FKProductID?

 

 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list