I have a entities as:
BaseEntity–> Which contains user login info like createdBy, createdTime, EditedBy, editedTimeEmployee–> which contains employee information like name, address, etc…RegularEmployee–> which contains salary, bonus tht kind of fields
andContactEmployee–> which contains HourlyRate, contactPeriod etc….
My inheritance structure is
How to design database structure in this case considering all the tables have
id and version fields (all tables should at least have these two fields).
If you want all tables to have id and version fields, you’ll have to use the table per concrete class strategy. See 9.1.5. Table per concrete class or 2.2.4. Mapping inheritance if you are using annotations.