The data file name adopts the system name + _ + file type. For example, if the system name is kupage, the database file is named kupage_database.mdf. Some database files have multiple, for example, SQL Server has two, one is a database file, and the other is a log file. Their files are named kupage_database.mdf and kupage_log.log respectively. All file names are in lower case.
Database Table naming rules: The table name cannot exceed 30 characters. The table name contains all words in the singular form. The first letter of a word must be in uppercase, and no connection symbol is required between multiple words. If there are multiple systems in the database, the table name is system name + word or multiple words. The system name is short for the development system. The system name is all lowercase English characters, such as bbstitle and bbsforumtype. If the database contains only one system, the table name uses only one or more words. Select one or more English words that can summarize the table content, such as userinfo and usertype. The name of a joined table is re_table A _ table B, and RE is the abbreviation of relative, such as re_user_articletype and re_user_formtype.
Database field naming rules: database Field names are all lowercase English words separated by "_". Naming rules are table alias + word, such as user_name and user_pwd. Table alias rules. If the table name is a word, the first four letters of the word are used as the alias. If the table name is a word, take the first two letters of each word to form an alias with four letters. If the table name is composed of three words, take one of the first two words and then two more letters from the last word. The result is a 4-letter alias.
The view name uses rule VIEW _ Table A _ table B _ Table C, and view indicates the view. When several tables are generated in this view, use "_" to connect the names of several tables. If there are too many tables, you can simplify the table name properly, but you must list all the table names.
Stored Procedure naming rules: P _ TABLE name_access procedure name (abbreviation), such as p_user_del and p_articletype_adddata.
Rules for writing SQL statements. keywords must be capitalized. For other statements, follow the naming rules described above. For example:
Select user_id, user_name from user where user_id = 'Tom'