When creating the architecture of a new project, I have trouble finding a good solution to manage public credentials.
For example, our users will receive a membership card. The member ID is printed on each card. But, in our business area, we expect cooperation with other companies, the format of these credentials could change in the future, or we will use additional credentials .
True, the member ID is not the primary key of the internal database or something like that.
These are the two options that I came:
- The member ID is a property of the user template.
- It is easy to question.
- But then we have to change the model and schema of the database whenever we have a new format.
- The membership ID has its own template that refers to the user template
- It's easy to expand.
- But then we have to join two tables for (more or less) each request
I know that this depends heavily on many factors for which this question is too brief, but is it advisable to wait for changes to the database schema instead of explicitly modeling this type of flexibility. I mean, it will only happen once in a few years.
Or do you have other ideas?