Basic question about a good way of organizing data in a database. Let's say I have a search site for multiple stores. Each store has a number of products. What is the best way of organizing price and inventory data? I see two ways of doing this:
- a table for every store , with the first column or two identifying a product, a column for inventory, and a column for price
- a table for inventory, and a table for prices, where the first column in both identifies the product, and separate columns for every store
The first option seems more convenient, but results in a lot more tables. Is it better to minimize the number of tables or does it not really matter, in terms of performance?
Also, for the first option, should I keep this data in a separate DB or can I store general product and store detail tables in the same DB?