Naming conventions
Table
Table names such as order/useraccout
Complies with the following specifications:
1. Uniform use of singular form, against Orders
2. Capitalize the first letter, multiple words, capitalize the first letter of the word, oppose Order/useraccout/order
3. Avoid Chinese pinyin and oppose Agentbaoci
4. Avoid underline connections, against User_accout (underline applies to Oracle database)
5. Avoid long names and oppose Websiteinfomationmodifyrecord
6. Many-to-many relationship tables, ending with mapping, such as userrolemapping
7. Avoid reserved words
Field
Field names such as Userid/username/usertype
Complies with the following specifications:
1. First letter lowercase, multiple words, the first letter of the word capital, against Userid/userid
2. Must have a primary key, the primary key is not directly with the ID, but the table name +id, such as Userid/orderid
3. Common field name, not directly with name, but table name +name, such as username/ordername
4. Common fields desc, not directly with desc, but table name +desc, such as userdesc/orderdesc
5. Must contain at least two lowercase letters before the capital letters, against uid/oid
6. Avoid Chinese pinyin
7. Avoid the underline connection
8. Avoid too long a name
9. Avoid reserved words
Object
1. Stored procedures are prefixed with sp_
2. Trigger is prefixed with tr_
3. The function is prefixed with fn_
4. The primary key is prefixed with pk_
5. Index is prefixed with ix_
6. Capitalize the first letter of the prefix, with multiple words, capitalize the first letter of the word, such as Sp_countfee
7. All letters of all keywords must be capitalized, such as SELECT userid,username from User
SQL Server naming convention