During the internal business training yesterday, we talked about the history of supplier status changes in the procurement business. As the company's business changes, the supplier status in the system's status table is constantly increasing.
However, since we have considered the future scalability at the beginning of the design, our status is not continuous. For example, the new status is 1, the review status is 11, and the void status is-1.
And so on.
Although this design ensures a certain degree of scalability, we may not need to select these unnecessary states in some places in the system. For example, I can view reports.
Because this status is no longer used, I do not need to be used as a filter condition. However, if no visible field is added for control, we must implement programming control at the system front-end.
.
This is obviously inconvenient, and the workload for subsequent development and maintenance is also increased. Therefore, this situation should be considered during database design.
The table design should include the following fields:
[ID] [int] not null,
[Status] [int] not null,
[Statusdesc] [nvarchar] (40) not null,
[Remark] [nvarchar] (250) not null,
[Visiable] [bit] not null,
[Svrid] [int] not null