4 ms·
Why wouldn't it have such guarantees, if the indices in question are defined as UNIQUE?
by int_19h 5y ago
Why wouldn't it have such guarantees, if the indices in question are defined as UNIQUE?
- rk06 5y agoBecause they are not unique in main table. For eg: if there are multiple emails from same domain name, then domain name column will have same entry multiple times. When domain is moved to sub table, main table still has duplicate entries, in form of foreign keys, while domain table has unique entry for each domain name
- int_19h 5y agoForeign key columns (i.e. the ones in the main table) are often indexed themselves, and those indices can also be UNIQUE.