交易表更新库存表? [英] Transaction table to update stock table?

查看:128
本文介绍了交易表更新库存表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试建立一个棒球卡数据库。


我认为最好的做法是让下面的表有一个事务查询或表单更新我购买的所有表或者我想卖出一张卡片(我需要弄清楚如何做到这一点,但我认为我应该创建一个单独的线程)。


数据库表格 -

TransTBL交易

ProductTBL产品

LocationTBL存储位置

StockTBL库存


我的问题 -

关于StockTBL:

对于产品的库存量永远不会超过1的棒球卡,这怎么办?


例如我永远不会有这样的东西:

StockTBL

记录 - > ID55441 / Cal Ripken /#222 / QTY 3


它看起来像这样:

StockTBL

记录 - > ID55441 / Cal Ripken /#222 / Grade 9

记录 - > ID55442 / Cal Ripken /#222 / Grade 8.5

记录 - > ID55446 / Cal Ripken /#222/10年级


我使用这个帖子作为参考(如果那是'反对礼仪请告诉我,我提前道歉)
添加/减去的库存表单从表格中的当前库存编号

I am trying to build a baseball card database.

Best practice I think would be to have the following tables then have a Transaction Query or Form update all the tables as I buy or sell a card I guess (I need to figure out how to do this but I think I''m supposed to create a separate thread).

DATABASE TABLES -
TransTBL for transactions
ProductTBL for products
LocationTBL for storage location
StockTBL for inventory

MY QUESTION -
In regard to the StockTBL:
How would this work for Baseball cards where inventory quantity for a product will never be greater than 1?

For example I will never have something like this:
StockTBL
Record -> ID55441 / Cal Ripken / #222 / QTY 3

It would instead look like this:
StockTBL
Record -> ID55441 / Cal Ripken / #222 / Grade 9
Record -> ID55442 / Cal Ripken / #222 / Grade 8.5
Record -> ID55446 / Cal Ripken / #222 / Grade 10

I am using this thread as reference (if that''s against etiquette please let me know and I apologize in advance)
Inventory Form that adds/subtracts from current inventory number in table

推荐答案

首先让我首先向您表达您的质量问题。大多数有经验的成员都不会像你一样设计好。实际上鼓励链接到另一个线程,其中已经布置了大量信息。
First let me start by commending you on the quality of your question. Most experienced members don''t manage to lay it out as well as you have. Far from being a problem, linking to another thread is actually encouraged where a lot of information is already laid out.
cmo187265:

关于StockTBL:

对于产品的库存数量永远不会超过1的棒球卡,这怎么办?
cmo187265:
In regard to the StockTBL:
How would this work for Baseball cards where inventory quantity for a product will never be greater than 1?



这取决于你打算采取的方法。每张卡都是独一无二的,无论其等级如何,或者同一等级的多张卡片是否作为数量大于1的物品存放?


如果前者那么你''确保您的销售表单上有个人卡可供选择,以便在进行库存调整时可以专门参考该特定库存商品。


如果后者然后你只需确保出售/调整的项目包括对等级和名称的引用,以便始终调整正确的库存记录。

That rather depends on the approach you intend to take. Is each card held uniquely, regardless of its grade, or would multiple cards of the same grade be held in stock as an item with a quantity greater than 1?

If the former then you''d make sure that the individual card is available on your selling form to choose from so that when the stock adjustment is made it can reference that particular stock item specifically.

If the latter then you would simply ensure that the item that''s sold/adjusted includes a reference to the grade as well as the name so that the correct stock record is always adjusted.


我''我已经在链接的帖子中添加了一个额外的帖子,你可能会对整个库存管理的整体理解有所帮助。


祝你的项目好运: - )
I''ve added an extra post in the linked thread that you may find helpful as far as the overall understanding of the management of the stock goes.

Best of luck with your project :-)


NeoPa (...)实际上鼓励链接到另一个线程那里很多o f信息已经布置好了。 (...)
NeoPa(...) linking to another thread is actually encouraged where a lot of information is already laid out. (...)



我不能同意这句话。



我想知道如果卡片数据不能再进一步标准化


至少

保持玩家名字的表格

表格持有团队名称

用于保存出版商名称的表(Topps,Fleer,Upper Deck等...)

?用于存放卡片系列名称的表格(如钻石,Chrome等...)


这样您可以为交易玩家,不同出版商等帐户...


我也会考虑一张能够保持成绩和/或资格的桌子

想要拿三个等级 - 一个可以包括1/2等级:
[PK_Grade] [描述性] [PSA] [SGC]

[1] [Gem-MT-10] [10] [100]

[ 2] [Mint] [9] [98]


我个人会将限定符拉到他们自己的表中,然后使用链接表来标记卡片


最后如果你想要附加卡片图像然后我会按照这篇文章的建议 - 附件字段有一些问题,其中之一就是它以极高的速度占用了可用于您的数据的空间:
在数据库中显示图像而不使用附件字段


如果我今天有时间,我会试着一起为桌子提供一个例子......不知道我的BB-Card Collection在哪里或者我会扫描图像或者两个......嗯......

I couldn''t agree more with this statement.


I wonder if the card data shouldn''t be normalized a bit further

At least
Table to hold player names
Table to hold team names
Table to hold publisher names (Topps, Fleer, Upper Deck, etc...)
? Table to hold card series names (like Diamond, Chrome, etc...)

This way you can account for traded players, different publishers etc...

I''d also consider a table to hold the grade and/or qualifiers
Something like to hold the major three - one could include the 1/2 grades:
[PK_Grade][Descriptive][PSA][SGC]
[1 ][Gem-MT-10 ][10 ][100]
[2 ][Mint ][9 ][98 ]

Personally I''d pull the qualifiers out into their own table and then use a linking table to "tag" the cards

Finally if you want to "Attach" the card image then I would follow this article''s advice - the attachment field has some issues, one of which is that it eats the space available for your data at a remarkable rate:
Display images in your DB without using Attachment Fields

If I get time today I''ll try to bodge an example together for the tables... no idea where my BB-Card Collection got to or I''d scan an image or two... hmmm...


这篇关于交易表更新库存表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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