This is probably common knowledge for DBAs, but in my database I am struggling with a simple registration of customers.
Customers can sign up using a form (we use typeform), meaning we create customer records without an actual registration form.
What to do if customers register twice? Or when different customers (maybe partners) register under the same e-mail address?
Is it wise to enforce
UNIQUE constraints, on for example the e-mail address, to prevent duplicate records? It seems like the best thing to do, but I can imagine that it will cause problems in the future.
The main reason would be a form submission with an email address already in the database. If I get a duplicate, I probably want to overwrite the old form data with the latest response. However, here I run the risk of "false" submissions which overwrite old data with fake data. If I do not overwrite the old record, I might lose the latest information.
Maybe I am overthinking the issue, but I find it difficult to make a decisive choice.
If I don't enforce the e-mail constraint, there is a chance that duplicate records occur when the same customer fills in the form twice (this occasionally happens). This is super annoying as now the team has to deal with two records and does not know which is the correct one.
Is there a good way to deal with this issue? Or it is best to simply choose one and deal with the consequences?