0
我有一個product
表:SQL模型(一對多),在SQL Server 2005
ProdId(PK)
Prod1
Prod2
Prod3
Prod4
和Certification
表:
Certification(PK):
Cert1
Cert2
Cert3
我需要建模ProdwithCert
關係(僞表)如下:
ProdwithCertId(PK) ProdwithCert
ProdwithCert1 "Prod1 with Cert1"
ProdwithCert2 "Prod1 with Cert1, Cert2"
ProdwithCert3 "Prod1 with Cert1, Cert2, Cert3"
ProdwithCert4 "Prod2 with Cert1, Cert2"
ProdwithCert5 "Prod2 with Cert1, Cert2, Cert3"
以下是限制條件:
- 不能有重複,例如在上表中,
ProdwithCert6 - "Prod2 with Cert1, Cert2, Cert3"
不允許 Product
有至少一個Certification
如何正確的模型在SQL Server 2005 ProdwithCert
關係?
由於