5 ms·
Using natural keys is what actually can prevent duplicate rows. In your above example, if email is the PK, there would be no duplicates. But adding an id as a P
by ahachete 11mo ago
Using natural keys is what actually can prevent duplicate rows. In your above example, if email is the PK, there would be no duplicates. But adding an id as a PK would essentially keep your database with duplicates:
(1, 'bob', 'bob@bobco.com')
(2, 'bob', 'bob@bobco.com')