【发布时间】:2017-08-21 15:34:39
【问题描述】:
我想通过 IdProduct 在餐桌客户和餐桌产品之间建立链接。
例子:
Create table customer(
idcustomer INT not null,
name Varchar(20),
idproduct INT,
);
create table Product(
idproduct INT not null,
nameProduct varchar(40)
);
我怎样才能像外键系统一样将两者联系在一起,当我选择一个客户时,我可以得到他所有的产品?这是关于数据库结构的问题。
【问题讨论】:
标签: mysql database database-design