Database Naming Convention --- Database Structure Name

xiaoxiao2021-03-06  83

[Standard 1] Database Name

The naming requirements of the database use the English letters associated with the database meaning and "DB_" head, for example, the name of the customer data database can be db_customer_info.

[Standard 2] Database Safety Design Name

The security naming of the database mainly includes the allocation and recycling of users, roles, and permissions of the application system database.

For the user's naming must be considered in three parties of department, position and username, namely the "deptid_positionid_staffid" format, where:

DeptID as the department's code or name or name

PositionID as the code or name or name of the post

StaffID is a user's code or name or name

Naming for rolery must be applied to application system administrators, institutional post administrators (eg, Director, Director, Class Team, etc.) and 3 parts of the specific operator, so it is recommended to use the following:

Named "Appsa_" head

Named "Possa_" head

The specific operator is named "APPUSR_"

Naming requirements for permissions Consider 2 aspects of development environment and application environments, can develop their naming specifications depending on the situation.

The development of the system definition (DDL) and system operation (DML) is considered.

Application systems should consider accessing to database objects (table space, table, field / domain, etc.) access and data operation (SELECT, INSERT, DELETE, UPDATE, etc.).

[Standard 3] Database Log Design Named

Naming of database logs is given in "dbname_logname.log" format, where:

DBNAME is the database name

Logname is a meaningful database log name

[Standard 4] Database Configuration Design Named

The database configuration design is saved in file form, and its content is the specific value of the configuration item for a particular database.

Naming of the database profile is given in "DatabaseName_Appname_cfg.txt" format, where:

DatabaseName is a trade-in, such as SYB represents Sybase, ORA represents Oracle, DB2 represents DB2, SQL represents SQL Server, etc.

Appname indicates the name or code of the application system

CFG means that the file is a database configuration file

[Standard 5] Database Copy and Storage Design Name

The database replication and storage design is saved in file form, and its content is a specific detail of the replication policy between a particular database.

Database replication and storage design files are given in the "dbname_appname_rep.txt" format, where:

DBNAME is an abbree of the database, such as SYB represents Sybase, ORA represents Oracle, DB2 represents DB2, SQL represents SQL Server, etc.

Appname indicates the name or code of the application system

REP indicates that the file is a database replication and storage file.

[Standard 6] Database Connection Design Name

The database connection design is saved in the file, and its content is the specific details of the connection design between a specific distributed database.

Naming of database connection design files is given in "DBNAME_APPNAME_DBL. TXT" format, where:

DBNAME is an abbree of the database, such as SYB represents Sybase, ORA represents Oracle, DB2 represents DB2, SQL represents SQL Server, etc.

Appname indicates the name or code of the application system

DBL indicates that the file is a database connection design file.

1.1.2. Database object naming

[Standard 7] Table space

Naming of database table spaces followed by the following format:

TBS_SERVERNAME_FUNCTION_SERIALNUMBER

In the above format:

TBS is required, indicating that the object is a table space.

ServerName is a name or name of the database physical server.

Function is the function of the role of the table space is a serial number with the database table space with this effect.

[Standard 8] Table

1. The name of the table must begin with TB (Table abbreviation), with the line (_), followed by the English letters associated with the mean, such as TB_CUSTOMERS.

2. The associated domain of the associated table uses the same naming method to make the association relationship between the tables obvious.

[Standard 9] field / domain

The naming of the field must begin with FD (Field abbreviation), with the line (_), the English letters associated with the field meaning. For example: fd_name.

[Standard 10] index

Naming specifications for indexes established for one or more fields in the database table can be determined in the following format:

IDX_TABLENAME_COLUMNNAME1_COLUMNNAME2_ ...

In the above format:

IDX is required, indicating that the object is an index.

TABLENAME is a name or name of the database table.

ColumnName1 is the name or name of the index field in the database table (first) index field

Columnname2 is a name or name of the index field in the database table (second) index field

Others, there are several fields, you can make a number of fields of the field or the name of the name.

Underline "_" can consider retention or delete

The total length of the index name must comply with the database regulations

[Standard 11] View

The naming of the view must begin with VW (View Abbreviation), with the line (_), the English letters associated with the view meaning. For example: VW_SORT_BY_NAME.

[Standard 12] stored procedure

The name of the stored procedure must conform to the p_subsystemname_detailName format, where P is represented by the stored procedure, and subsystemname is the English-language of the subsystem. DetailName is an English letter associated with the stored procedure, such as: p_query_write_to_disk.

[Standard 13] trigger

The naming of the trigger must comply with TRG_SUBSystemName_DetailName format, where TRG represents the trigger, subsystemname is the English-language of the subsystem, and DetailName is English letters associated with the trigger meaning.

[Standard 14] function

The naming of the function must comply with the f_subsystemname_detailname format, where f is represented by a function, subsystemname is the English abbreviation of the subsystem, and DetailName is English letters associated with function meaning, such as f_salary_count.

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

New Post(0)