machumpion
Registered User.
- Local time
- Yesterday, 22:57
- Joined
- May 26, 2016
- Messages
- 93
G'day!
I want to store the unit prices I sell my products to distributors for.
I have distributors to whom i sell my products to. Prices for products vary depending on Container (i.e. bag, jar, case etc) and type (fruit, vegetable, meat etc.). In addition, sometimes the prices vary depending on which distributor I sell to.
These attributes are in the 'Products' table. Distributors are in the 'distributor' table.
I tried to make a junction table [distrbcost] featuring 'distributor', 'container', 'type' and 'unitcost'. This table has no primary key, because container, type, distributor and unitcost are not unique IDs.
From [distrbcost], i joined [distributor] to [distributor].[distributor] and [type] to [products].[type], and [container] to [products].[container]. (see attached)
Later on, it seems Access automatically made 4 new "sub" Products tables (Products_1, Products_2.. Products_4). Running a query of the products against a distributor's orders seems to be working correctly. Is this the optimal way to design form this relationship? What is the deal with the extra Product_x tables?
I want to store the unit prices I sell my products to distributors for.
I have distributors to whom i sell my products to. Prices for products vary depending on Container (i.e. bag, jar, case etc) and type (fruit, vegetable, meat etc.). In addition, sometimes the prices vary depending on which distributor I sell to.
These attributes are in the 'Products' table. Distributors are in the 'distributor' table.
I tried to make a junction table [distrbcost] featuring 'distributor', 'container', 'type' and 'unitcost'. This table has no primary key, because container, type, distributor and unitcost are not unique IDs.
From [distrbcost], i joined [distributor] to [distributor].[distributor] and [type] to [products].[type], and [container] to [products].[container]. (see attached)
Later on, it seems Access automatically made 4 new "sub" Products tables (Products_1, Products_2.. Products_4). Running a query of the products against a distributor's orders seems to be working correctly. Is this the optimal way to design form this relationship? What is the deal with the extra Product_x tables?