Object | specification | data | Database naming Conventions Database nomenclature
A Names of entities and attributes
1. Commonly used words have been abbreviated, and in the naming process, the abbreviations can be pieced together according to semantics. Note that because the Orcal database unifies the field names into either uppercase or lowercase, the underscore is required
Example:
Defined abbreviations for sales:sal sales;
Order:ord orders;
DETAIL:DTL details;
The sales Order name fine table is named: SAL_ORD_DTL;
2. If the name of a table or field has only one word, it is recommended that you do not use abbreviations but complete words.
Example:
defined abbreviation Material Ma goods;
The Item table is named: Material, not Ma.
But the field code is: ma_id, not material_id.
3. All the tables that store the values list prefix Z
The goal is to sort the values list classes at the end of the database.
4. All redundant classes are named (mainly cumulative tables) preceded by prefix X
Redundant classes are fields that are added to improve database efficiency and are not normalized to a database. or table
5. The Association class is named after the two basic classes are appended with an underscore, followed by an alphabetical list of two table names or table names.
Association tables are used to save many-to-many 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.
For example: The table Object has a many-to-many relationship with itself, then the table that holds the many-to-many relationship is named: R_object;
Table depart and employee; there are many-to-many relationships; The associated table is named R_dept_emp
6. Each table will have an automatic ID as the primary health, the logical master is defined as the first set of candidates, and if the encoding is automatically generated by the database, it is named: ID, and if it is a custom logical encoding, it is named with the "id" method.
Example: The number field of a sales order is named: sal_ord_id; If there is a database-generated AutoNumber, it is named: ID.
7. All attributes plus the suffix for the type, the abbreviation for the type suffix is defined in the file "type suffix abbreviation definition", note that if additional suffixes are required, they are placed before the type suffix.
Two Name of the relationship
The name of the relationship is basically the same; if you have special circumstances, you can handle it flexibly.
[Must/may/can/should] [Verb/verb+prep] [a/many/exatly num] Structure naming of [or A/many]
Three Name of Domain
Four Naming of triggers
Five There are a few notes about the default
1. Strictly dependent on the primary fine table, the main table suffix main can not be written.
2. The data type is the field of the text, and the type suffix TX can not be written.
3. Some of the more obvious types of fields, you can not write the type suffix.
4. Very obvious relationship that can not be written
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.