現在、1 つまたは複数の製品のオークションを作成できるオークション サイトを作成しています。これは、製品のいくつかの異なるバリエーションで管理する必要があります。
私の問題は、在庫管理を処理するための最適な MySQL 構造を構築したかどうかわからないことです。これが私のDBの外観です。
属性 AttributeValues 組み合わせ CombinationParts
ここでは、次の接続を行います。
Attributes is the "main" name of the attribute - e.g. "Size", "Colour" or so. This has a
ProductID (connecting it to a product).
AttributeValues is the value - e.g. "43", "44", "45"...
I connect this to Attributes on a field called AttributeID.
次に、いくつかの組み合わせを作成します。たとえば、靴に複数の属性がある場合、組み合わせが作成されます。
Combinations has the name and stock of the product - connected
to a product on ProductID
- e.g. "Nike shoe, red, 43" or "T-shirt, blue, Large".
CombinationParts is then connecting to a product with an AuctionID and then
to a AttributeValue with AttributeValueID.
編集:在庫を各製品に接続する理由は、より多くの製品をオークションに接続できるようにする必要があるためです
アイデアは、オークションを作成するときに、各タイプの在庫数を入力することです。
私の問題は、同じことを簡単にできるかどうかです。言い換えれば、サイトを 25,000 個の製品を含むように拡張する必要がある場合、これは最適ですか?