Alternative to relationship Loop (1 Viewer)

Delid4ve

Beginner but fast learner
Local time
Today, 21:07
Joined
Oct 6, 2015
Messages
50
Further to my original post regarding multiple many to many relationships I have started a fresh and am relating my data to the customer/product/supplier/order model that most tutorials are based on. For the basics it fits my purpose, well, as far as I've got anyway and is helping me create the correct relationships. However I'd like some advice on a loop situation and how it can be avoided, if it can be.
For example have used(1)one, (~)many
So, we have:
Customers(1)-(~)orders(1)-(~)orderdetails(~)-(1)products(1)-(~)supplierdetails(~)-(1)suppliers

Note the slight change as many products can have many suppliers in my setup

Now what I want to know is how and where I could implement returns
Now my perspective on this is that it is also a many to many relationship with products, however, this would create a loop as it would also have a one to many relationship with customers and I don't believe this is acceptable from previous advice.

Is a loop ok in this situation?
Is there another way this relationship can be formed to avoid the loop?

I have many situations in my setup that would involve this kind of relationship issue so the answer to this establishes the whole underlying setup of my database.
 

MarkK

bit cruncher
Local time
Today, 13:07
Joined
Mar 17, 2004
Messages
8,179
Isn't a return just an order with a negative quantity in the order details table? Like, you can modify the user interface so users can distinguish it from a normal order, but you just have to reverse all the math, right? And with addition, you do that with subtraction.
 

Delid4ve

Beginner but fast learner
Local time
Today, 21:07
Joined
Oct 6, 2015
Messages
50
Thanks

Missed that even though so logical. However iv changed the design of the tables as its quite specific to collection and returns (multiple types of forms) and that way wouldnt have worked with th other info needed.

Opened my brain a little tho thnks
 

Users who are viewing this thread

Top Bottom