Traditional Culture Encyclopedia - Lucky day inquiry - Five commonly used fields

Five commonly used fields

Frequently used fields are as follows: One thing to note is, do you save the ID or the full name? It is best to distinguish between codes.

ID: Primary key. Each entity has its unique identification code, just like our ID number. In general, it is recommended to use a single primary key as a foreign key and set the association constraint between the primary key and the secondary key of the database.

Code name: No, but it can't be repeated. Sometimes I use a program to judge, and sometimes I create a unique index, so I can't repeat it automatically.

User name: login name, in numbers or pinyin, easy to enter when logging in, such as "jirigala".

FullName: name, this is the real name, such as "Jiri Gala".

CompanyID: Which company did this data belong to at that time, because it is possible for employees to change jobs and companies.

Department: Which department did this data belong to at that time?

WorkgroupID: Which workgroup did this data belong to at that time?

StaffID: Which employee owned this data at that time?

Enabled: No matter whether the data is effective or not, the entered data will probably need to be approved before it becomes effective.

Delete Flag: Is the data deleted? I can't really delete the data, so I can't restore it.

AuditStatus: The audit process is placed in another table, but the status is written in this table. Strictly speaking, the state should not be placed in this table, but in the workflow table.

Note: No amount of domain design can ever meet the ever-changing needs of customers. Get an extra remarks field, and all the contents that can't be put down and there is no place to put them can be stuffed into this field, otherwise you will set the 1000 field, and 1000 1 demand may appear. Sort code:

CreateUserID: Who created these data? Record the primary key, because the name may be duplicated directly. For example, in Inner Mongolia, the probability of my name being repeated is much higher.

CreateUserRealname: the name of the creator. Although it is redundant, it is very convenient to display data in the list. Now that the hard disk is big, redundancy doesn't matter.

Date of Creation: When was this data created? If something goes wrong, we can still know when it was made. The public security attaches great importance to it. When someone is clicked, it's best to specify where it happened.

ModifyUserID: Who modified the data?

ModifyUserRealname: who?

Date of Modification: When was the data modified?