库存概念 - 制作正确的数据库

时间:2022-09-27 12:08:32

Im a but stuck on the concept of Inventory.

我是一个但坚持库存的概念。

Here is the business process: The company restocks their medicine every year. The inventories are recorded in a spreadsheet that contains

这是业务流程:公司每年补充药品。库存记录在包含的电子表格中

Beginning Count - Consumed Count - Ending Count

Now here is the crisis. Should I make a table that holds the Beginning count or not?

现在是危机。我应该制作一个包含起始计数的表格吗?

My Logical reason.

我的逻辑原因。

If I dont add a table that records the items stocked yearly

Summing the Consumed and Ending balance will result to the total Inventory. The system is accurate enough to provide us with that information. If the Physical count does not match the System count, then there is human error (Either the encoded number is more than the actual count the other way around).

总结消耗和结束余额将导致总库存。该系统足够准确,可以为我们提供该信息。如果物理计数与系统计数不匹配,则存在人为错误(编码的数字大于实际计数,反之亦然)。

If I add a table that records the items stocked yearly

Wouldn't there be a data redundancy in my database? but it does provide a reference of what the medicine count should be. but what if there is too much medicine and the system has less? How will the human error be distinguished?

我的数据库中不会有数据冗余吗?但它确实提供了药物计数应该是什么的参考。但是,如果药物太多而系统较少呢?如何区分人为错误?

1 个解决方案

#1


1  

Off the top of my head there are a few ways of approaching this. Here is one:

在我的脑海中,有几种方法可以解决这个问题。这是一个:

  • Table for keeping details about inventory items and latest count.
  • 用于保存库存物品和最新计数的详细信息的表。

  • Table for keeping records of stock flows
  • 用于保存库存流量记录的表

#1


1  

Off the top of my head there are a few ways of approaching this. Here is one:

在我的脑海中,有几种方法可以解决这个问题。这是一个:

  • Table for keeping details about inventory items and latest count.
  • 用于保存库存物品和最新计数的详细信息的表。

  • Table for keeping records of stock flows
  • 用于保存库存流量记录的表