MySQL Learning note-character set

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.