2

Mysql http://shop.ccs.comにあるこのような e コマース サイトを、製品、製品の品質、サイズ、色の価格との間でどのように扱っているかを知りたいです。私のは

  1. テーブル製品
    1. ID
    2. 名前
    3. 両親
  2. テーブルサイズ
    1. ID
    2. id_product
    3. size_name
  3. テーブルの色
    1. ID
    2. id_product
4

1 に答える 1

0

うーん..私はこの構造を思いついた、それが少し役立つことを願っています。製品情報を含むマスターテーブルが必要です。ここで私たちの場合、その製品ID、サイズ、色の表現。残りのテーブルはマスターテーブルに接続します

1.table products_id (master table)
     1.id- Primary Key
     2.id_product_size- References size.id (FK)
     3.id_product_color- References color.id (FK)

 2. table product_name
     1.product_id- References product_id.id(FK)
     2.name
     3.parents

 3.table size 
     1.id- Primary Key
     2.size_name
     3.quantity

 4.table color 
     1.id- Primary Key
     2.colors
     3.quantity
于 2013-01-23T07:17:20.773 に答える