こんにちは私は現在、プロジェクトのデータベースを構築しようとしています。
現在、すべてにordersが必要customerでcustomersあり、addressさらに が必要shipto addressです。最大 10 種類までshipto addresses追加できます。そして、それぞれが別のorder場所に出荷されている可能性があります。addresscustomer
これをどのようにモデル化すればよいか、誰にもわかりませんか?
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
これらすべてをどのようにリンクする必要がありますか?
*編集 ちょうど考えていたのですが、顧客は注文に属すべきでしょうか? それとも、注文は顧客に属するべきですか?