Some naming conventions in the process of database design

Source: Internet
Author: User
Tags naming convention
Specification | process | design | data | database | Database design
The naming convention is very important in the database design process, and the reasonable design of the naming code can save the developer a lot of time to distinguish the database entity.

Database physical design includes: table design, view design, stored process design, user-defined function design, and so on.

1. Table Design Naming conventions: tables use T to start with the best way to classify a table by attributes and number it.

Such as: the Encoding table can be written as tbm001something T for the table, BM for the business type, 001 for the category of the first few tables something is the name of the table annotation.

2. View design naming convention: The view design process uses V to begin with, and the view is named to make the main table of the view or the view implementation function.

Such as: The above tbm001something for the main table made view can be named vbm001something

or Vgetsomethinginfo and so on.

3. Stored procedure Naming conventions: User-defined stored procedures are named after their implementation using p.

such as: Pgetsomethinginfo

4,

Stored procedure naming convention: a user-defined stored procedure is named after its implementation using the beginning of F.

such as: Fgetsomethinginfo

In addition, during the process of making a user-defined function of the view stored procedure, note that the annotation is written.



Comments include: name, function, call, use table, update record, design ideas, entry parameters

/*========================================================

Stored Procedure name: Pro_txt005traceleadersearch

Role: Statistical analysis of resource updates in generated logs

Call stored procedure: Pro_txt005traceleadersearch

Use table: T bm001something ...

Update records: 1, cc 2004-7-15 Build stored procedures

2, CC 2005-2-6 Modify stored procedures, processing bugs add new content

Design idea: Algorithm description

Entry parameters: @startDate start date, @endDate end time

--=========================================================*/


Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.