Answer the question
In order to leave comments, you need to log in
Mysql store everything in 1 table or several?
There are many small blocks on the site (phone numbers, partners, address, working hours, social links, etc.) that are edited separately and saved to the database as separate entries.
That is, there is a table 'singl' with fields singl: (int 100), content: (varchar 500) there are about 50 such small blocks.
And there is a table 'pages' with fields pages: (int 100), content: (varchar 3000) where the content is stored - the long text of the page. There are about 30 such pages.
It turns out that when we open a page of the site, we make a selection in two tables, in the 'articul' and 'pages' fields.
The question is, does it make sense to divide into 2 tables, can everything be stored in one?
Which option is more correct in your opinion?
Answer the question
In order to leave comments, you need to log in
Yes, you can merge 2 tables into one.
This is called denormalization.
All methods are correct in their own way. But the format of the message is not enough for the development of this thought. Roughly speaking. If your data is not updated. And there will be no update anomalies. Then calmly store everything in 1 table.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question