1

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?

0

1 Answer 1

4

Identification via e-mail address typically also involves authentication by e-mail address (e.g. send a mail to the claimed address and register only upon reply to that mail). After that point (when registration has been made), "cautious design" will demand that you won't allow overwriting the existing registration too easily or too lightly, meaning essentially : only allowed by that very same user who has properly authenticated himself once again. Or by working with confirmation mails where any change is only done effectively upon receipt of confirmation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.