The naming specification in the database design process is very important, and the naming specification is designed to save the developer's more time to distinguish between database entities. Database physical design includes: table design, view design, stored procedure design, user-defined function design, etc.
1. Table Design Name Specification: Table Use t starts best to classify and numbered tables according to attributes.
Such as: The coding table can be written as the beginning of the table, the BM is the business type, 001 is the name annotation of the table for the first table in this category.
2, View Design Naming Specification: The view is used in the view design, and the view name is named to make a view of the home table, or the implementation function of the view is accurate.
Such as: The above TBM001Something is a view of the main table. You can name VBM001Something.
Or VgetsomethingInfo et al.
3, stored procedure naming specification: User-defined stored procedures use P beginning with its implementation function named,
Such as: PgetsomethingInfo
4,
Storage Procedure Naming Specification: User-defined stored procedures use f to start with its implementation function,
FGETSMETHINFOFO
In addition, in the process of making a view stored procedure user-defined function, pay attention to write a note.
Comments include: name, role, call, usage table, update record, design ideas, entrance parameters
/ * ================================================================================================================================================================ =========
Stored Procedure Name: Pro_TXT005TRACEEADERSEARCH
Action: Resource Update Statistical Analysis
Call stored procedure: pro_txt005traceleadersearch
Use table: T bm001something. . . . . .
Update record: 1, cc
2004-7-15
Build a stored procedure
2, CC
2005-2-6
Modify the stored procedure, process bug add new content
Design Idea: Description of Algorithms
Inlet parameters: @startdate Start Date, @ Enddate End Time
- ================================================================================================================================================================== ========= * /