Database naming specification
One. Named of entities and properties
1. Common words have been abbreviated, in the naming process, according to semantic patchwork abbreviation. Note that due to the Orcal database, the field name is unified to a capital or lowercase, so the underscore is required.
Example:
Defined abbreviation SALES: SAL sales;
Order: ORD order;
Detail: DTL details;
Then the sales order name is named: Sal_ORD_DTL;
2. If the table or the name of the field has only one word, it is recommended not to use abbreviations, but use a complete word.
Example:
Defined abbreviation Material MA items;
The item is named: Material, not MA.
But the field item coding is: ma_id; not matial_id
3. All stored value lists in front add prefix Z
The purpose is to sort these values list in the database.
4. All redundant classes of naming (mainly accumulated tables) front plus quix x
Redundant categories are in order to improve the database efficiency, and add in the non-standardized database. Or table
5. The association class is named after two basic classes after connecting the two basic classes with the underline, and the abbreviation of the two table names or table names are listed later.
Association tables for saving multiple pairs of relationships.
If the associated table name is greater than 10 letters, the original table name must be abbreviated. If there are no other reasons, it is recommended to use abbreviations.
Example: Table Object and itself have many-to-many relationships, saving many-to-many table names: r_Object;
Table depart and employee; there are many-to-many relationships; the association table is named R_DEPT_EMP
6. Each table will have an automatic ID as a primary, logically masterjian as the first group of candidate, if the database is automatically generated, unified named: ID; if it is a custom logical The encoding is named using an abbreviated method.
Example: Name field named: Sal_ord_id; if there is still a database generated automatic number, name: ID.
7. All attributes plus the type of suffix, an abbreviation definition of the type suffix, see the file "Type Handfix Self-definition", note that if other suffixes are required, they are placed before the type suffix.
two. Relationship naming
The naming of the relationship is basically followed; if there is special circumstances, it can be flexible.
[Must / May / CAN / SHOULD] [VERB / VERB PREP] [A / MANY / EXATLY NUM] [OR A / MANY] Structure Name
three. Domain naming
four. Naming of the trigger
Fives. Related to the default description
1. Strictly dependent the main table of relationships, the suffix of the primary table may not write.
2. The data type is the field of text, and the type suffix TX may not be written.
3. Some types are more obvious fields, and they can write the type suffix.
4. Very obvious relationship, can not write