Section IV: The system uses global variables
1, USERCODE currently logged in user code
2, PROCLINE encoded line currently logged
3, CLASSNO currently logged shift
4, LOCALIP currently logged IP addresses
5, the company currently logged SYS_COMPANY
6, SYS_FACTORY currently logged factory
Section V: System Development Constraints
A table naming rules:
Rules: xx (project abbreviation) _yy (specific modules) _oo (specific business) _zz (optional)
Second, the view naming rules:
Rules: vw (fixed prefix) _xx (project abbreviation) _yy (module name) _oo (business meaning) _zz (No.)
Third, the stored procedure naming conventions
Rules: prc (defined prefix) _xx (project abbreviation) _yy (specific modules) _oo (business meaning) _zz (No.)
Fourth, the function naming rules:
Rule: f (fixed prefix) _xx (abbreviated item) _yy (specific modules) _oo (business meaning) _zz (No.)
Fifth, the sequence naming rules:
Rule: seq (fixed prefix) _xx (abbreviated item) _yy (specific modules) _zz (No.)
SQL Server no sequence, corresponding to the identity column.
The column has the following three types of characteristics:
1, the column data type is the type without a decimal value
2, during the insertion (the Insert) operation, the value of the column is generated by the system according to certain rules, does not allow nulls
3 column value will not be repeated, has the effect of identifying each row in the table, each table can have only one identity column.
Create and modify an identity column
to create and modify an identity column, usually in the Enterprise Manager and can be realized with Transact-SQL statement, using the Enterprise Manager management is relatively simple, please refer to the online help for SQL Server, which
was only discuss the use of Transact -SQL method
1, specify the identity column when you create a table
identity column can be used to establish the iDENTITY property, and therefore in SQL Server, also known as the identity column or iDENTITY column with the iDENTITY property.
The following example creates a named ID contains, int, and seed 1, is incremented by 1 column identifies
the CREATE TABLE T_test
(ID int the IDENTITY (1,1),
the Name VARCHAR (50)
)
- insert data
INSERT T_test (Name) VALUES ( 'John Doe');
Six, Package naming :( do not try)
Rule: pg (fixed prefix) _xx (abbreviated item) _yy (specific modules) _zz (optional number)
Seven, do not try to trigger naming :()
Rules: tg (fixed prefix) _xx (table)
Eight fields in the table naming convention: field names have a certain meaning
(All of the following N) table sys_field (all of the following Y)
Name Virtual Type Nullable Comments(评论)
LIFNR N VARCHAR2 (20) Y supplier code
ID N NUMBER(22) Y 本表ID
MID N NUMBER(22) Y 父表ID
PID N NUMBER(22) Y 爷表ID
COMPANY N VARCHAR2 (10) Y coded Company
FACTORY N VARCHAR2 (10) Y facility code
CREATE_BY VARCHAR2 (30) Created
CREATE_DATE DATE Created
LASTUPDATE_BY VARCHAR2 (30) Last Modified
MEMO VARCHAR2 (200) Remarks
ITEM_NO VARCHAR2 (100) material coding
ITEM_NAME VARCHAR2 (100) Material name
BOARD_ITEM VARCHAR2 (20) Product Code
BOARD_NAME VARCHAR2 (10) Product Name
ITEM_UNIT VARCHAR2 (10) Material Unit
DEPOT_CODE VARCHAR2 (10) Inventory name of the place
KUNNR VARCHAR2 (20) Customer code
NAME1 VARCHAR2 (20) suppliers \ Customer Name