DevMachine
DevMachine

Reputation: 563

Design Company -> Location -> Product Database

I'm trying to design tables : Company -> Location -> Products tables for a project I'm working on

So basically a company has multiple locations.

Each location can have the same of different products and also products can have different prices across different locations.

So my question is, how can I efficiently design this use case because my problem is that:

Is it good to add a PRODUCT table and add another table between location and product (PRODUCT_LOCATION) that will have the price and other properties specific to a location?

Thank you for taking the time to read my question,

Upvotes: 0

Views: 117

Answers (1)

Suyash Gaur
Suyash Gaur

Reputation: 2881

You can use a mapping table for Location and Product and then using primary key for this, you can create a mapping table with LocationProductId and Price.

Upvotes: 2

Related Questions