Child pages
  • Modeling Inheritance with Entity Modeler

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


If you are modeling inheritance and you don't already have your subentities modeled, then you may probably want to use entity modeler's subclass widget. To use it, just select the entity you want to subclass and click the subclass button in the toolbar. The rest is self explanatory. Entity modeler does a good job creating Horizontal and Single Table entities for you. Vertical Inheritance will require a bit more work.Image Removed 

Image Added

Manual Inheritance Modeling

Horizontal Inheritance

By far the easiest form of inheritance to model is Horizontal Inheritance. If you've already modeled a subentity, just select the entity then in the properties panel, select a parent entity and you're done. Yes, it really is that easy. When you save your model, Entity Modeler warns that you forgot to copy parent relationships and attributes to your new child entity. Then it kindly does the job for you.


Gotchas: Due to the way the PKs are modeled, you must have a database that supports deferred constraints, or you must handle the order of the commit operations. I have tried VI in three different databases and it only worked in Postgresql so far. Maybe MySQL would work if the operations were ordered. I didn't try it.