こんにちは私は現在、プロジェクトのデータベースを構築しようとしています。
現在、すべてにorders
が必要customer
でcustomers
あり、address
さらに が必要shipto address
です。最大 10 種類までshipto addresses
追加できます。そして、それぞれが別のorder
場所に出荷されている可能性があります。address
customer
これをどのようにモデル化すればよいか、誰にもわかりませんか?
Orders
------
ID
customerID (referencing ID from customers)
other rubbish
Customers
---------
ID
Address
Email
Phone
other rubbish
Shipto
------
ID
CustomerID (referencing ID from customers)
Address
other address related stuff
これらすべてをどのようにリンクする必要がありますか?
*編集 ちょうど考えていたのですが、顧客は注文に属すべきでしょうか? それとも、注文は顧客に属するべきですか?