I am working on a sports database.

I have table for persons(players), teams, leagues etc.

The problem is, how do I identify a person uniqely? I was thinking that a new person could be added by either league organizer, team, or the player themselves, by registering to the website with this database.

One player can play in multiple leagues. So when they are already in the database and a new league will want to add him again, there will be a duplicate.

The only solution I can think of is using the persons national ID, as there potentially could be two persons with the same name, birthplace, and birth date.

Another solution I can think of is alerting the user that there is already a person with the same or similar data. Then they can check if it is really new person or just a duplicate. However, this doesn't work well as the user could still add duplicates.

What are your opinions on this problem? Can you give me some advice?


This isn't really a database administration question, but one about your business rules (real or imaginary). If you look at the internets, the most common way to uniquely identify users is by their email addresses or usernames (handles, aliases etc.).

Storing national IDs, which constitute sensitive private information, is a bad idea, as your application then will need to comply with all sorts of regulations that apply to the processors of SPI.

Allowing users to view other users' data is an even worse idea, as that would be a direct violation of various privacy laws.

  • There are jurisdictions where it is illegal to use government-issued ID for identification in private systems. Dec 17 '20 at 3:36
  • thanks for answer, so I can never guarantee unique users
    – Rikib1999
    Dec 17 '20 at 9:22
  • Why do you think so? Email addresses are guaranteed to be unique, and you can easily force uniqueness of usernames.
    – mustaccio
    Dec 17 '20 at 13:02
  • yeah, with emails it should work, but still if someone wants to make new person which already is in database, just with another email (or none), he could do it. either way, thanks for helping, emails should eliminate these unwanted duplicates in most cases
    – Rikib1999
    Dec 17 '20 at 16:51

The question you need to ask yourself is what is the practical negative consequence of duplicate entries?

Is it important to your system that someone plays football in Spain and golf in the U.S.A. and that these two activities need to be linked?

Are you worried about someone deliberately creating duplicates or fakes (e.g. sock puppet records)? Will this negatively impact your system? If so, how?

Identifying people uniquely is very difficult. Some countries don't even have a way of uniquely identifying all of their residents. You need a patchwork of different identification schemes and even then you can't be 100% sure of uniqueness.

The question is, how much does it matter and how much work do you need to do to prevent these duplicates or, when they inevitably happen, to find a practical way to combine different "copies" of a person into a single record?

  • Hi, I want to make site for player profile with his statistics and there it could be filtered by league ,season etc or even sumed up. So the database overall will be much cleaner and exact. It is meant to be a database for amateur local leagues and for proffesional either. I am also worried that someone would just fill the database with false duplicates and ruin someones else statistics.
    – Rikib1999
    Dec 16 '20 at 23:22
  • I was thinking about some way of approval by myself. If the team player league will identify itself by either id or something, I will tag them as approved and all the other leagues mostly smaller ones as not approved/checked. Than the user can filter the data he is viewing and searching through by approved only data etc. So he will have in mind that if he is working with not checked data there is no guarantee it is true.
    – Rikib1999
    Dec 16 '20 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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