2
我有一对父子关系的表。数据库设计 - 上下文约束条件
domain:
id int not null auto_increment primary_key
domain varchar(100) not null
domain_url:
id int not null auto_increment primary key
domain_id int not null
path varchar(512)
在这里,我想保持一个域的唯一路径。整个域路径可以复制。 在路径上应用的最佳约束是什么?
我应该关注domain_id和path之间的组合键。组合键是一种可靠的解决方案吗