Good afternoon, I have a question about databases. I know it's something completely unrelated to programming but it's something important.
From what I understand when it comes to working with common attributes of something they are put in the same entity. But when you have common and uncommon attributes at the same time of the same thing, they are put in independent but related entities.
My big problem is that I have a main entity that represents my user and 2 that represent sub types of the main one, for example an administrator and a programmer, both are users. But they have different attributes, so it is not possible to have a single entity.
But my question is how do I make the relationships? Since a user in my structure can only be associated to one sub type at a time. That is to say, the reference of a user account cannot be in both sub entities at the same time. Only in one of them at a time, there is my problem.
I don't know how to do this in a proper and functional way, without having duplication problems.