如何在库存管理系统中设计物料主表结构 [英] how to design Item Master Table Structure in inventory Management System

查看:369
本文介绍了如何在库存管理系统中设计物料主表结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为库存管理系统设计数据库,这是一个小应用程序。

在这种情况下,我对项目主结构感到困惑,需要创建标识列或项目编号列,其中id将手动生成通过使用max(上一个项目编号)。

哪种方法更好。

从以下设计中需要维护itemno列或ID列是可以的。

我也想知道哪种方法更好,何时使用。



ID ItemNo ItemName

28 000001名片

29 000002婚礼卡

30 000003公司信

31 000004儿童书

I want to design database for inventory management system which is small application .
In this situation i am confused with item master structure where need to create identity column or item number column which id will manually generated by using max(prev item number).
which approach is better.
From following design there is need to maintain itemno column or ID column is ok.
and also i want to know which approach is better and when to used.

ID ItemNo ItemName
28 000001 Visiting Card
29 000002 wedding card
30 000003 Company Letter
31 000004 Kids book

推荐答案

最佳实践

始终 设计数据库表,其中包含对用户隐藏的标识列和用户可以看到的可见标识符(项目编号,项目代码等)。通过这种方式,您可以对程序进行编码,以便用户可以更改可见的标识符,而不会影响链接到此表的其他表。



此外,用户可以在设计期间告诉您,他们永远不需要更改可见标识符。他们最终将面临必须改变它的局面。无论是与另一家公司合并,还是有人输错了标识符,都需要对其进行更改。按照上述最佳实践设计数据库表可以让您和您的用户更轻松。
Best Practice
Always design database tables with an Identity column that is hidden from the user and a visible identifier (Item Number, Item Code, etc.) that the user can see. Doing it this way lets you code your program so that the user can change the visible identifier without affecting the other tables that are linked to this table.

Also, users may tell you during design that they will never need to change the visible identifier. They will eventually have a situation where they have to change it. Whether it is a merger with another company or someone mistyped the identifier, there will be a need to change it. Designing the database tables following the above Best Practice makes life easier for you and your users.


这篇关于如何在库存管理系统中设计物料主表结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆