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之間的組合鍵。組合鍵是一種可靠的解決方案嗎