I understand the concept of Inheritance, I am currently working with a condominium administration project, and I find myself in the following question as you can see below;
Please disregard the Debts table, my problem in question is the Condomino, Syndicate, Dweller and Owner table. The Sindico, Morador and Proprietario are a type of Condomino, because I know that if I had to put the same attributes that are in Condomino and put in Sindico, Morador and Proprietario would be redundant, that's why I put Condomino as Super-Class and the classes Sindico, Dweller and Owner as Sub-Class, that is, Condomino will be abstract and the other classes below will inherit the attributes of the Condomino class.
I can abstract all this very well in UML, and I also know how to do this in Java, in all classes I put JPA annotations such as @NotBlank, and I just put the @Id, @GeneratedValue annotation in Sub-Classes because the Condomino class is an abstract class.
The other thing I did was just put @Entity in the Sub-Classes for the same reason the class Condomino is an abstract class.
Does it shape what I did is correct? Is it when I run the project it will create all my tables right in the database?
If even with the description I made below it is necessary to put the code here in this post, do not worry I put it, but I think with the descriptions I made above you can understand.