Model inheritance creating tables that share too much in common is WET, not good practice

Normally, If I have a base class that I use as a parent to various other child classes, I won’t use that parent class much at all, and it will only serve as a parent but in the case of the Django orm, that class, by default creates a table in the database. I looked into it, and there’s the managed = False attribute which tells Django not to create a database table, if I’m looking to keep my database architecture DRY, would this be what I’m looking for? Should this flag be more properly worded?

If you have a parent and child model, they both share several fields and are represented in the database, doesn’t this become redundant? Inheritance in other cases will result in similar objects being defined but the difference is that they won’t be created as tables in a database.

I’m just interested to hear other people’s thoughts about this, to reiterate, I’m referring to model inheritance creating redundant tables in the database.

Welcome @xeon !

If the parent class is a concrete class (not abstract), then the fields in the parent class are not replicated in the table created for the child class.

If the parent class is an abstract class, then there is no table created for the parent

Review the docs at Model inheritance