Referring to various naming conventions, we uniformly use the following naming conventions:
If there is an existing abbreviation in the naming process, the abbreviation should be used, and if there is none, it must not be abbreviated, e.g., ISBN
Database: Composed of one or three English words with the first letter of the word capitalized, e.g.: DepartmentManage;
Table name: Use the full spelling of words of noun nature, capitalize the first letter of each word, and use plural form, such as: Books If the table is used to indicate the relationship between fields in the other two tables, it is in the singular (i.e., the table indicating the relationship between entities is named in the singular), and there is no preposition such as "and of in" in the middle of the word For example: BookAuthor
==============================================================================================
1. The fields in the table are generally represented by the full spelling of noun words, which are composed of one or three English words with the first letter of the word capitalized, such as: UserName;
2. The primary key name of the table is Table Name + ID, for example, the primary key of the Document table is DocumentID
3. Foreign key name: main table name + corresponding column name, such as DepartmentsID, as follows: In the table Departments, the fields are: ID, DepartmentName In the table UserInfo, the fields are: UserId, UserName, DepartmentsID DepartmentsID as foreign keys
4. The columns that automatically grow in the table are always named ID;
5. If the field is bool, use the forms "IsShow", "IsValid", "HasPassed", "HasExamined", "IgnoreCase"
6. If the field bit is DateTime type, the default value is to take the system time, and always name the bit: CheckDate
7. Status is the column name of the status in the table, the default value is 0, and the delete operation in the table will change the value of Status without actually deleting the record.
8. Stored procedure naming: sp_ table name_method, such as: sp_News_Add, sp_News_Update;
9. View Name: vi_ table name, such as: vi_News;
10. All tables, stored procedures, views, and other objects are DBOs, so don't use the database username, as this will affect the changes of the database user
|