Reference specification during database design

xiaoxiao2021-03-05  23

Database table naming specification, the length of the table name cannot exceed 30 characters, the table name contains all the singular forms in the form, the word first write letter should be capitalized, and there is no connection symbol between multiple words. If there are multiple systems in the library, the table name uses the system name word or multiple words, the system name is the abbreviation of the development system, the system name is all lowercase English characters, such as BBSTITE, BBSForumType. If you only contain one system in the library, the table name is only used with a word or multiple words. Word selection can summarize one or more English words of the table, such as UserInfo, Usertype. Off-table naming rules are RE_ table A_ Table B, RE is the abbreviation of the Revelive, such as: RE_USER_ARTICLETYPE, RE_USER_FORMTYPE.

Database field naming specification, the database field name is all lowercase English words, and the word "_" is separated, the naming rule is the name word, such as user_name, user_pwd. The table name rules, if the table name is a word, the alias will take the first 4 letters of the word; if the table name is two words, the first two letters of the two words form four letters long alias; if the table The name consists of three words. You may wish to take one of the first words and then remove the two letters from the last word, and the result is an alias for 4 letters.

The view name uses rule view_ table A_ table B_ table C, and the view represents the view. This view is generated by several tables with "_" to connect several tables, if the table can be properly simplified, but must list all table names.

Stored Procedure Name Rules P_ Table Name_Exact Process Name (abbreviation), such as p_user_del, p_articles.

SQL statement writing rules, keywords must be capitalized, other writing is written according to the above name rules, such as: select user_id, user_name from user where user_id = 'Tom'

转载请注明原文地址:https://www.9cbs.com/read-36325.html

New Post(0)