This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13663|Reply: 1

[Communication] It is best not to set a string with meaning as a primary key

[Copy link]
Posted on 4/7/2015 2:52:02 PM | | |


Recently, I saw a video on the Internet, which introduced the settings of the main key,

The video says that it is best not to set the meaningful string as the main key, and the setting of the main key must not have meaning.

Why is it better not to set a string with meaning as a primary key?

1: In the design of the table, there are generally primary keys and foreign keys, if the primary key is modified, other foreign keys will also be modified as needed.

2: If you use the primary key to find data, and then the primary key is a meaningful character, it is easy to leak information.

Therefore, it is best to set the primary key to some meaningless characters, such as: 1, 2, 3.....




Previous:The Imperial Backup King cannot link to MYSQL, please set the database-related settings... solution
Next:java.math.BigDecimal class
Posted on 8/5/2015 6:37:48 PM |
haoahaoahaoaoah
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com