Home > database >  A database field contains a lot of the data or use more good storage?
A database field contains a lot of the data or use more good storage?

Time:10-02

A database field contains a lot of the data or use more good storage?

CodePudding user response:

The need to see specific requirements, to meet the design of the database specifications as far as possible,

CodePudding user response:

According to the actual demand, you said this should be more columns

CodePudding user response:

Give you say a specific example,
For example: the user's shipping address, do you think a complete address directly, or is divided into provinces, city, district, detailed address four fields is better?

Taobao, jingdong, such as electricity are all of them are separated,
Why is that?
If you don't separate, the user is likely to be blind to fill, don't write provinces and cities, for example, write your own xx district, xx address directly, finally cause the Courier delivery difficulties,
In addition, the province, city, district these fields is public, only for connection, also save a lot of space,

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

So, when you are talking about this kind of question, be sure to talk about specific scenarios, otherwise no one give you the accurate answer,

CodePudding user response:

Separately, such as express delivery, if you don't separate, the user is likely to be blind to fill, don't write provinces and cities, for example, write your own xx district, xx address directly, finally cause the Courier delivery difficulties,
In addition, the province, city, district these fields is public, only for connection, also save a lot of space,

CodePudding user response:

Particular case is particular analysis

My personal way to distinguish is

Less application scenarios, are small, multiple data into a field in the

Application scenarios, are large, especially as a query based on frequent, on the redundant table, multi-line processing

Enterprise image, for example, I was in a field, such as information classification, I was on the redundant table
  • Related