我有一个product
表:SQL数据库设计咨询
ProdId(PK)
Prod1
Prod2
Prod3
Prod4
和Certification
表:
Certification(PK):
Cert1
Cert2
Cert3
如何模型以下关系(伪表):
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"
这个问题应该移动到dba.stackexchange.com,因为它似乎是数据库架构相关。 psuedotable仅用于说明 – Gray 2014-03-30 17:12:25