Hi, all.
I’m currently designing a Django application that will serve as an interface for creating, managing, and practicing different types of flashcards, e.g., front and back, multiple-choice, etc. and am considering how to structure my models. Ideally, each type of flashcard will have its own model, e.g., FrontBackFlashcard
, MultipleChoiceFlashcard
, etc., and will share several basic attributes.
The resulting application should allow users to practice with sets of flashcards that include multiple flashcard types and the application design should be flexible enough that adding new types in the future does not require significant code changes.
I’m currently leaning toward multi-table inheritance together with the third-party app django-polymorphic because this would make it relatively simple on the backend to interact with all types of flashcards.
However, I am concerned about the performance implications of the “inner joins” that will happen with each of my ORM queries but I lack the experience with relational databases in general to know whether this concern warrants an abstract-base-class approach instead. The latter would presumably require more code relating to my ORM queries and be more complicated to maintain.
Would anyone with more Django and/or relational database experience have advice on how to best approach this?
Thanks in advance!