Data model - where to store a person's 'name'

Have a data model question.

Use case:

  • In my app I have players for a club (with typical info, name, position, contact details etc).
  • Players may or may not have a user account registered.
  • Not only players can have an account i.e. Coaches, Management staff will have an account and enter players manually that don’t sign up.

Where should I be storing the player’s First Name / Last Name? Seems odd to capture it on the User and on the Player data type… Same question for email…

Appreciate any guidance / recommendation :slight_smile:

Why does capturing first and last name on the Player data type seems odd?

Well I just mean, it would be capturing it twice. Where a player and user are for the same person, the first and last name should be the same.

In trying to type a response though I think I answered my question… There can be users that don’t have an associated player profile, and players that don’t have a user account. Therefore the fields need to be on both data types, and UX should take care of ensuring consistency.

1 Like

Even if the user is a real user you can still create a “Player” data type for them and just store their name only on the Player