I design a product database and I have a design question.
There are several different product categories, such as books, video games, home electronics, and pet supplies. There are some things, for example, the manufacturer and price, while other things are unique for each category, say, power consumption.
Individual products will be periodically updated, the price may be unstable, and the manufacturer will remain fairly constant (I believe that the manufacturer can be bought by another company and the brand name absorbed in the purchasing company). Updates can occur hourly. Requests for each product can be made often (depending on the number of customers, therefore, without restrictions).
I'm more interested in the speed of data access for clients than in the speed at which I cam performs data updates.
What makes more sense and why ?:
- one table for all categories with nullable columns (for example, supplies for pets will have a null value for energy consumption).
- one table for each category with repeating columns (for example, the price will be in each table).
- one table for common functions (price, manufacturer, etc.) and one table for unique properties
source
share