Answer the question
In order to leave comments, you need to log in
Is it better to have one table with many columns or many small tables?
It is necessary to enter information about the properties of a certain product into the database. Moreover, each property contains several parameters.
For example,
Property1 (param1, param2, param3)
Property2 (param4, param5, param6) what is the best
way to design a database?
make one table:
product_id | property1_param1 | property1_param2 | property1_param3 | property2_param4 | property2_param5 and so on.
or make several tables, each corresponding to a certain property:
Tbl1. property1
product_id | param1 | param2 | param3 |
Tbl2. property2
product_id | param4 | param5 | param6 |
We are talking about a small number of records (no more than 1000). And not so many properties and parameters. The total number of parameters is not more than 30.
Answer the question
In order to leave comments, you need to log in
habrahabr.ru/post/193756 Here is a good article on database normalization. It basically has the answers to your questions.
Depends on the situation.
In general, if there are not many records, then the muscle supports XML. including samples.
As they say, the taste and color ... Try to realize this and that and choose already with a calm soul)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question