The character set is a set of symbols and encoding rules, whether in the Oracle database or in the MySQL database, there is a character set selection problem, and if in the database creation phase does not select the correct character set, you may need to replace the character set in the late, and the replacement of the character set is a relatively expensive operation, There is also a certain risk, so in the beginning of the application, according to the needs of the correct selection of the appropriate character set, to avoid unnecessary adjustments later.
So what is a character set? One word. The character set character set is a mapping table of characters <-> binary bytes.
How is the character set chosen?
1. Space saving: It is recommended to use a small character set as much as possible if the application is fully satisfied. Because a smaller character set means that it saves space, reduces the number of bytes transmitted over the network, and improves the performance of the system due to the small amount of storage space indirectly. There are many character sets that can hold Chinese characters, such as UTF8, gb2312, GBK, GB18030, and so on, but gb2312 and GBK are commonly used.
2. Compatibility: Because the gb2312 font is smaller than the GBK font, some remote words (for example: Minghe) can not be saved, so in the selection of character sets, it is important to weigh the probability of these remote words in the application and the impact of the occurrence.
3. On the Internet, the trend of internationalization is inevitable, and the storage space has been more quantitative, it is recommended to use UTF8, if the development of intranet systems, such as internal OA, etc., you can consider GBK.
MySQL Learning note-character set