📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

A company uses a customer’s email as the primary key. Later the customer changes email. What is the best design fix?

A. Delete the customer and re-enter them
B. Use a stable surrogate CustomerID as the primary key and keep email as a unique column ✅
C. Remove the primary key entirely
D. Change all foreign keys manually every time

Correct Answer: B. Use a stable surrogate CustomerID as the primary key and keep email as a unique column

Explanation

A surrogate primary key stays stable while the email, kept unique, can change safely without breaking linked orders or payments.